Hi All,
I have been trying few Aspose sample program to convert CSV files to Excel. Below is the sample code which I have tried:
//Specify the LoadOptions
LoadOptions opt = new LoadOptions(LoadFormat.CSV);
//Set the memory preferences
opt.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);
Workbook wb4 = new Workbook("e://Source.txt", opt);
wb4.save("SourceXLS3.xls",FileFormatType.EXCEL_97_TO_2003);
Workbook wb5 = new Workbook("e://Source.txt", opt);
wb5.save("SourceXLS4.xlsx",FileFormatType.XLSX);
I got few doubts about this code.
1. Is this the right way or the most efficient way of converting CSV file to Excel format?
2. For what conditions or file size, I should use MEMORY_PREFERENCE?
3. How the MEMORY_PREFERENCE internally works? How it effects the performance of conversion?
4. Is there anything else, which I should take care while implementing the code?
5. When I open the saved output file in excel, I get the date in format of ###### even though internally it the date is stored correctlIy. If I look at the Excel Formating Type, it shows the format as *14-03-2012. The excel describes the date formats begining with an asterik(*) respond to changes in the regional date and time settings that are specified for the operating system.
The question is that how can I set the date format while conversion so that I don't have to see dates in ##### format?
Thanks,
Aditya