Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
195
Invalid characters imported from excel
posted

Hi, 

We use Infragistic excel library (Infragistics.Documents.Excel) to read excel documents and load them in Ultragrid. One of our clients extract data from their system into a csv file, do some formatting in Excel and then import the excel document in our application.

We have discovered that when importing these documents in Ultragrid, there are some invalid characters “_x000D_” included in the text.

I'm pin pointed the problem to this line of code where we get the cell value

object cellValue = myWorkbook.Worksheets[aWorkSheet].Rows[rowIndex].Cells[columnIndex].Value;

During debug, I see the following value in variable “cellValue”.

cellValue     "Partly_x000D_\r\n_x000D_\r\n*\tOnce again, [..y._x000D_\r\n*\tHowever, the proposed new guidelines are sometimes too unspecific.The required disclosures should be clarified in a more concise manner.\r\n"  object {string}

Could you suggest how to get rid of these (and potentially) any other invalid characters.

I've attached a  sample excel document that can be used to reproduce the problem.

Regards,

Harman

general-comments-120919.zip