We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

export to excel - empty IRange.Text

Thread ID:

Created:

Updated:

Platform:

Replies:

96497 Sep 16,2010 10:44 AM Sep 28,2010 08:28 AM Windows Forms 4
loading
Tags: GridControl
sdll
Asked On September 16, 2010 10:44 AM

Hi,
i am trying to export a grid to excel using XlsIo

Everything works fine but i have a problem.

If IRange.Text is empty, no formatting is set, and the range appears at the first column/first row of the worksheet, then it is not exported.

so for example, if the workspace that i am exporting is set like this:

| | aaa | bbb |
| | ccc | ddd |

then it is exported as follows (the first column is not exported)

| aaa | bbb |
| ccc | ddd |

I think this is related to the flag
IWorksheet.UsedRangeIncludesFormatting

However, i am using SF version 6.2.0.40 and this flag is not available.
Is there a way to export empty cells?


Nirmal Raja [Syncfusion]
Replied On September 20, 2010 08:02 AM

Hi,

Thank you for your interest in Syncfusion products.

I am unable to reproduce the mentioned issue on the GridControl which I deleted the first column cell values. You can use the default exporting method instead creating your own work sheet, where we have not made use of UsedRangeIncludesFormatting property with in our converter.

Please try the issue in the sample from our sample browser on following location:
{Installed Drive}:\Syncfusion\EssentialStudio\{Version Number}\Windows\Grid.Windows\Samples\2.0\Export\GC XLS Export Demo\

Let me know if you have any concern.

Regards,
Nirmal


sdll
Replied On September 20, 2010 10:10 AM

Hi Nirmal,
thanks for the help.
I forgot to mention that this happens only when exporting to CSV.

Unfortunately i cannot use the default exporting method due to business logic.

to export the sheet i use the following call:

sheet.SaveAs(filename, csvExporter.Delimiter, System.Text.Encoding.ASCII);

Please try to reproduce the problem exporting to csv, where the first column has no values and no formatting (and no header is exported)


sdll
Replied On September 23, 2010 06:47 AM

Any updates on this issue?



Christopher Issac Sunder K [Syncfusion]
Replied On September 28, 2010 08:28 AM

Hi,

Thanks for the update.

The GridGroupingControl can be exported to the csv format of file, by copying the text to the buffer which copies with the delimiter so that it can be provided as a csv format.

Please refer the sample attached in the below location which illustrates the behavior:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GridToCSV1154072814.zip

Let me know if you have any queries.

Regards,
Christo.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;