Is there away to save data to csv file instead of excel. I am using a FileHelperEngine which is responsible for a comma delimited file. At the moment I am exporting to csv from the file dialog, but the filehelperengine does not recognized the file as csv until I resave to CSV from excel. i am currently doing this below
SaveFileDialog saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.InitialDirectory = @"C:\"; saveFileDialog1.Title = "Save EasyTimesheet CSV"; saveFileDialog1.DefaultExt = "csv"; saveFileDialog1.Filter = "CSV files (*.csv)|*.csv|All files (*.*)|*.*"; saveFileDialog1.FilterIndex = 2; saveFileDialog1.FileName = filenameFormat; saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { return saveFileDialog1.FileName; } else return filename; }
--------------------
this.dgTimeSheets.DataSource = _DataViewCSVImport;
FileInfo fileInfo = new FileInfo(filename);
Workbook workbook = new Workbook(WorkbookFormat.Excel2007); Worksheet ws1 = workbook.Worksheets.Add(fileInfo.Name);
DataPresenterExcelExporter exporter = new DataPresenterExcelExporter();
exporter.Export(this.dgTimeSheets, workbook); workbook.Save(filename);
Hello Darnell,
Currently, the Workbook class does not support saving and loading to and from CSV files. It only supports the formats found in the WorkbookFormat Enumeration described in the following topic:
http://help.infragistics.com/doc/WPF/2015.2/CLR4.0/?page=InfragisticsWPF4.Documents.Excel.v15.2~Infragistics.Documents.Excel.WorkbookFormat.html
The following table illustrates how these formats map to MS Excel formats:
Member
Description
Excel Save As Dialog Format
Excel2007
The Excel 2007 XML file format.
Excel Workbook (*.xlsx)
Excel2007MacroEnabled
The Excel 2007 Macro-Enabled XML file format.
Excel Macro-Enabled Workbook (*.xlsm)
Excel2007MacroEnabledTemplate
The Excel 2007 Macro-Enabled Template XML file format.
Excel Macro-Enabled Template (*.xlst)
Excel2007Template
The Excel 2007 Template XML file format.
Excel Template (*.xltx)
Excel97To2003
The Excel 97-2003 BIFF8 file format.
Excel 97-2003 Workbook (*.xls)
Excel97To2003Template
The Excel 97-2003 Template BIFF8 file format.
Excel 97-2003 Template (*.xlt)
StrictOpenXml
The Strict Open XML file format (ISO/IEC 29500 Strict).
Strict Open XML Spreadsheet (*.xlsx)
If you have any further questions on the matter do not hesitate to contact us.
You guys should add a csv exporter in the next version of your software. Where the exporter, exports to an csv file.
Hello pianoboy11,
You can suggest new Product Ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
Steps to create your idea:
1. Log into the Infragistics Product Ideas site at http://ideas.infragistics.com (creating a new login if needed).
2. Navigate to the product / platform channel of your choice (e.g. WPF, Windows Forms, ASP.NET, HTML5 / Ignite UI, iOS / NucliOS, etc.)
3. Add your product idea and be sure to be specific and provide as much detail as possible.
• Explain the context in which a feature would be used, why it is needed, why it can’t be accomplished today, and who would benefit from it. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. Be convincing!
• [CASE: “Reference case [case number], FORUMS: “Include a link to this thread”] in your idea so product management will be able to look back at this case.
The benefits of submitting the product idea yourself include:
- Direct communication with our product management team regarding your product idea.
- Notifications whenever new information regarding your idea becomes available.
Additional benefits of the Product Idea system include:
- Ability to vote on your favorite product ideas to let us know which ones are the most important to you. You will have ten votes for this and can change which ideas you are voting for at any time.
- Allow you to shape the future of our products by requesting new controls and products altogether.
- You and other developers can discuss existing product ideas with members of our Product Management team.
The product ideas site allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.
Thank you for contacting Infragistics.