Questions about XlsIO

I have two questions regarding to XlsIO,

1. when set a value to the sheet
sheet.SetValue(1, i++, "30");

My intention is that I want the cell value to be string 30, however, after opening the Excel, the Excel shows a warning that I might have data type problem (see attm). How can I programmically set the used range in the worksheet to have only text value, so that Excel never show this warning icon?

2. If I want to create only a single sheet in a workbook and do not want the user to add more sheets, can I programmatically hide the Insert Sheet tab at the bottom (see attm)?

Thank you.



Screen Capture_48a5fc56.zip

5 Replies

BR Balamurugan R Syncfusion Team December 9, 2009 01:15 PM UTC

Hi Boyan,

Thankyou for your interest in Syncfusion product.
It is possible to ignore the warnings due to data type and also you can protect your workbook.This is the snippt for your request.

C#:
1.To ignore the warnings:

sheet.Range["A1:D2"].IgnoreErrorOptions = ExcelIgnoreError.NumberAsText;

2.To Protect your workBook:

workbook.Protect(isProtectWindow, isProtectContent, "syncfusion");

Please,Let us know if you have any queries.

Regards,
Balamurugan


AD Administrator Syncfusion Team December 10, 2009 02:40 AM UTC

Hi Balamurugan,

Your solution worked, thank you for help!

I have one more question. When I use XlsIO to open a cvs file, I found the component cannot parse a field across multiple lines, for example

"a value on
multiple lines"

May I know will you resolve this problem?

Yours Sincerely,
Boyan


BR Balamurugan R Syncfusion Team December 11, 2009 04:12 AM UTC

Hi Boyan,
I am afraid that i am not able to reproduce the issue.could you please send me a simplified sample for more analysis.

Please,let us know if you have any queries.

Regards,
Balamurugan




AD Administrator Syncfusion Team December 11, 2009 07:39 AM UTC

Hi,

In the attachment file, there is a sample csv which contains a field that is wrapped inside double quotes but has a line break. According the strict csv spedification, that should be a single field. However, using XlsIO to read that csv file and save as a xlsx file, opening the xlsx file in Excel shows that the field is broken into two fields.

Opening the csv directly in Excel treats that as a single field.



Multiline CSV_59990960.zip


BR Balamurugan R Syncfusion Team December 15, 2009 03:55 AM UTC

Hi Boyan,

Could you please report this issue through Direct Trac Developer support system.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidentsbecause you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. Thank you for your participation in Syncfusion’s Community Forums”.

Regards,
Balamurugan


Loader.
Up arrow icon