PDA

View Full Version : Error when emailing csv files



wstansbury
16-Jul-2014, 02:29 PM
When I schedule a report with the output of 'csv' the column headers are stripped off the table

Bob Cergol
16-Jul-2014, 05:07 PM
That's not an error per se. It may or may not be desired to have the first row of raw csv data labeled. In cases where exports are being automated, usually for automated imports, the data structure is known and labels are not needed or wanted as the data is not intended for human viewing.

It is simply an idiosyncracy that emailed CSVs do not include labels as the first row, whereas if you simply output CSV from the tools menu, you will get the first row of labels.

If you must have the labels, then use the tools menu to output a report to CSV.

Bob

Bob Cergol
17-Jul-2014, 07:24 AM
Wayne,

Alternatively you could email as an Excel sheet instead of CSV. The column titles are included in that case. You could then save the Excel sheet as a CSV.

Bob

wstansbury
30-Jul-2014, 09:06 AM
My bad but I should have started with the problem andthen maybe you can help. I am emailing this report to a person in ourMailroom area. She needs to open the file and save it. I do notwant her to have to do a lot of steps. The Excel option is not the best either since first, it opens with threerows before you get to the header row (row 1 = blank, row 2 = title, row 3 =date) and second it opens as a web file. Therefore you have to save as an Excel file, …. She will use the file as a database to mergethe data unto a Word file. CSV files work best for merged docs so is there a work around where the first row could be populated with columnheaders?

Bob Cergol
30-Jul-2014, 09:29 AM
You don't have to save an Excel file as such. You can save-as a CSV file.

Regardless, how about just giving her a link to the report (shortcut on her desktop, or in an email) that she can use to run the report with one mouse click. Then she would just need to do 3 mouse clicks to open the report as a CSV, with the header row: tools, CSV option, "open" downloaded file. It is only on scheduled email output of CSV that it excludes the header row. Using the CSV option from the tools menu will output a single row of column titles followed by the data.

Bob

Bob Cergol
30-Jul-2014, 10:57 AM
P.S. In the URL if you'll append &DEVICE=CSV as shown in the example URL below, then when she clicks on the URL the very next thing she'll see is the dialog to open the CSV file in Excel -- and she will get the header row. So in this case she "pulls" the file to her on demand, instead of you "pushing" it to her via scheduled email.

http://HostSeverNameOrIPAddress/ai6/ai.asp?UID=UserName&PW=PassWord&DAI_R=2952&DEVICE=CSV (http://server/ai6/ai.asp?UID=administrator&PW=NotTellingYa!&DAI_R=2952&DEVICE=CSV)

Bob

wstansbury
30-Jul-2014, 01:13 PM
Perfect! - Thanks Bob for your quick response.