Page 1 of 1

Convert csv to excel preserving columns

Posted: Mon Nov 17, 2014 3:56 pm
by intl_sp
How can csv files be converted to excel format with preserving the columns?

I tried to convert a csv to excel and all the data was pushed into one column, the column structure was completely lost...

Re: Convert csv to excel preserving columns

Posted: Tue Nov 18, 2014 9:36 am
by Support_Rick
Read the CSV file and create a Rowset Variable ... just as if you read from DB Table, etc.

Use the Rowset Variable as the Input Rowset Variable into writing the Excel Spreadsheet.

Write the Excel Spreadsheet by defining the columns... as an example:

Code: Select all
<writeExcel label="Write Billable Projects" inputRowSetVariable="${Projects}" outputFile="${FileName}" whenFileExists="overwrite" excelFormat="excel2007" includeHeadings="true" outputFileVariable="excelFile" version="2.0">
	<data startRowNumber="2">
		<column index="1" name="F1" />
		<column index="2" name="F2" />
		<column index="3" name="F3" />
		<column index="4" name="F4" />
		<column index="5" name="F5" />
		<column index="6" name="F6" type="DECIMAL" pattern="#,###,###.00" fontColor="Red" />
		<column index="7" name="F7" />
		<column index="8" name="F8" />
	</data>
</writeExcel>

Re: Convert csv to excel preserving columns

Posted: Fri Nov 21, 2014 10:20 am
by intl_sp
Its been listed that GoAnyWhere can convert formats to & from Excel, XML, Delimited text and Flat File or Fixed Width file formats can the same logic be used while dealing with the formats listed above?

Re: Convert csv to excel preserving columns

Posted: Fri Nov 21, 2014 3:11 pm
by Support_Rick
I'm not sure I understand your question...

Can GoAnywhere convert data from XML -> Excel or CSV -> Fixed Width or Database -> XML?

Absolutely!

And you can define the parameters put into those values as needed.

Re: Convert csv to excel preserving columns

Posted: Wed Nov 26, 2014 9:16 am
by intl_sp
thanks! that helped