Hi, currently I'm running the export (to csv file) using drush command which is run in cron once every hour - every day.
But there's a certain time that there's NO data on the Views, which causing the module export the csv file that contains HTML syntax on it.

Anyway to handle this properly? Or is there some setting that I should know?
Or can just simply make the csv file to contain nothing maybe?

I also aware that when I run it through browser by putting the URL on the browser, it says: "This webpage is not found" (if it's Chrome).

Thanks

Comments

ardnet’s picture

Status: Active » Closed (works as designed)

OK, all these time I actually turned off the option for "Make first row a list of column headers".
But in this case I probably just turn this back on, at least this is to solve when there's no data on the Views, it created an empty csv file.
Even though I don't really like the header being displayed on the csv file, but I guess this is fine for now.

Cheers

ñull’s picture

Version: 7.x-3.0-beta6 » 7.x-3.x-dev
Component: Miscellaneous » Code
Category: feature » bug
Status: Closed (works as designed) » Active

The original poster has its particular use for the data export. I don't consider this a feature, because my design philosophy has the peculiarity that it tries to avoid user annoyance by illogic behaviour. It is illogical to present to the user an export button/link when there is in fact nothing useful to download. Just downloading a "first row of column headers" is not logical either. So please could this be fixed?

steven jones’s picture

Status: Active » Closed (works as designed)

Sadly to work out if there is data to export would involve executing the view, which could be very expensive. I don't see the issue with allowing a user to export an empty file if there isn't any data to export.