|
Group: Forum Members
Posts: 785,
Visits: 3.6K
|
I looked at the ExportToExcel_AddRow method in the source code. It uses a StringBuilder to put together the syntax involved in the create row method. It is basically a SQL INSERT INTO command. The column names are surrounded with brackets, so hopefully, that would take care of that problem; however, there may be an issue with invalid string data within the business object. Here is the syntax for a string field:
createRow.Append("'" + bo.CurrentRow[col.ColumnName].ToString().Replace("'","") + "'");
createRow is the StringBuilder object. Maybe the Replace method should read: .Replace("'", "''"). Not sure how to solve the problem. Check your string data in the business object and see if anything stands out.
|