We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ExportDataTableAsString with regex

Hi, I am trying to open an excel file and extract the data into a dataset.

Using the ExportDataTable method I am able to build the dataset from the sheets in the workbook.

I need the data to be cleaned, removing msWord chars like 66 and 99 and cr and lf etc..

Is there a way to apply a regex to the data in the workbook prior to exporting or during export without having to iterate through every cell and manually apply the regex? There are 4 in total that I need to apply and I'm concerned about the performance of trying to do this manually.

I am working with workbooks containing 200 000 rows of 30 columns across 20 sheets.

Thank You.

Hi,

I think you may try to use Workbook.Replace() method for your need, e.g

workbook.Replace(strVal, String.Empty);
//Or
workbook.Replace(stringVal, “”);


Thank you.

Thank you, this works, although it's a bit cumbersome having to apply each and every replace char seperately. With regex I can apply a range of chars to be replaced at 1 time. Would be good if the option was included..