Free Support Forum - aspose.com

Need better data type support in the Replace method

Hi Ben,

The Replace method used with an ADO.NET DataTable is probably one of Aspose.Excel’s best features because it makes it so easy to dump data into a spreadsheet file, but it seems to be a bit limited in its support for standard data types.

The two that I have particularly noticed are the bit and datetime types.

If a column in the DataTable uses the bit data type then its value does not get copied into the spreadsheet at all. The column in the spreadsheet will just be blank, but it should be a numeric column set to either 1 or 0.

If a column in the DataTable uses the datetime data type then its value is copied into the spreadsheet as a string and that is no use in Excel, where it needs to appear as a date.

I know that Aspose.Excel does support Excel dates and times, so would it be possible to have the Replace method check the data type of the column in the DataTable and use the correct corresponding type in the Excel worksheet?

Thanks!
Sean

Dear Sean,

Thanks for your suggestion. Yes, we should make a better support for standard data types.

I plan to enhance the Replace method before the middle of March. Now thanks for your patience.

Hi Laurence,

Do have any update on when the Replace method enhancements will be ready?

Thanks
Sean

Hi Sean,

It’s enhanced. Please download the latest hotfix.