Gridview Export to Excel

Posted by: SusanTennier

Gridview Export to Excel - 10/18/16 01:05 PM

When we export from Gridview to Excel, the data in Excel is formatted in a table. Is there a way to export as unformatted text? We want to create a .csv for importing from the Gridview data.
Posted by: Bruce Gardner

Re: Gridview Export to Excel - 10/18/16 01:25 PM

Hi Susan:

Here is a PDF document that provides a couple of ExcelDirect-related tips, including how to export to CSV: ExcelDirect document

I'll confess that I've never tried this with GridView, only with using ExcelDirect to export a grid from a module. However I expect it would work the same way.
Posted by: SusanTennier

Re: Gridview Export to Excel - 10/20/16 10:44 AM

Thanks, we can see how we can export gridviews to .csv however it seems we can only globally change it. We actually only want to export one particular gridview to .csv, not every gridview. Is this possible?
Posted by: Steve Schwartz

Re: Gridview Export to Excel - 10/20/16 02:43 PM

Hi Susan

I don't think it's possible. I've created a batch file that temporarily swaps in a SSI2XL.INI file, does the export to CSV and then swaps the file out. That's the best I've come up with so far.

Steve
Posted by: Michael Mulrooney

Re: Gridview Export to Excel - 10/20/16 03:26 PM

In a future release of Gridview will include Export to | CSV

It is possible to open an Excel spreadsheet and the sav Excel, open the Excel workbook and File | Save As | CSV. An extra step but it gets you what you desire.
Posted by: Steve Schwartz

Re: Gridview Export to Excel - 10/20/16 04:24 PM

It doesn't get you to where you want to be because Excel likes to modify text to fit its preconceived notion of what it thinks it should be. The objective is to go straight to CSV without Excel getting its hands on it.

Steve
Posted by: LanceBakker

Re: Gridview Export to Excel - 10/21/16 12:39 PM

Hi Everyone,

I have a work around that worked for us. We were reading data from an .XLS and exporting that data combined with data from Adagio. When I created the .INI file it broke that link. I changed the data we were reading from to a .CSV (we unfortunately need to hide the header so it doesn't pull into the Gridview). Doing that fixed that link and we can now export to Open Office to save our .CSV file to Unicode UTF-8 (the language we need for our website). Having a CSV export button would help as now everything exports as CSV into Open Office, it would be nice to only do a single file when you need it.

Thanks,
-Lance