This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi There, Version 6 has problem on export DataGrid datato a file when the data is string with quotes as in the screenshot "ExprotTable.JPG". When I use DataGridExporter.Csv.WriteFile(dataGrid, fileName); to export and open it in excel, it will have extra quotes at the end see screenshot "ExprotTableExcelProblem1.JPG" If I use
same as in screenshot "ExprotTableExcelProblem1.JPG" If I use exporter.IsQuotingEnabled = false; then the exiting quotes is gone as in "ExprotTableExcelProblem2.JPG" since the original data has the quotes so when I export it to a file I want to have quote like the data in third column, if the original data don't have the quotes, I don't want to have it either, like in first column. writing to the string has no problem if I set :
Version 5 does not have the same problem. Thanks, Gordon |
|
|
Hello Gordon Thanks for pointing this out. It turns out that Excel require 3 quote marks in order for this to work. 2 quote marks causes the strange behavior that you saw. I've updated the CSV exporter to include extra quote marks when the value is already quoted. This will be available in the next nightly build. To get the desired effect you described, you'll want to set IsQuotingEnabled to true. -Jason Fauchelle |
|