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.

Reading a stream from Excel File Anomaly

Thread ID:

Created:

Updated:

Platform:

Replies:

103560 May 11,2012 03:47 AM Jun 3,2012 11:52 PM Windows Forms 10
loading
Tags: XlsIO
Amber
Asked On May 11, 2012 03:47 AM

Hi, 
I have a password protected Excel File. And as I am reading a stream from Excel File, it's(Excel File's) password is getting flushed. Why is it so?
stream = new FileStream(path, FileMode.Open);
IWorkbook wb = XlObj.Excel.Workbooks.Open(stream);

Amber
Replied On May 11, 2012 03:58 AM

Just realized that problem is not with the stream, but the Excel File's password is getting flushed away anyway. What should I do so that my password remains intact while I read the Excel File?

Johnson Monohar M [Syncfusion]
Replied On May 16, 2012 12:54 AM

Hi Amber,

Thank you for using Syncfusion products.

The reported issue is not reproducing at our end. We have created a sample excel file with password and tried to open as a stream. But, it is throwing an exception saying the workbook is protected. Please find a video screen shot of the same from the following link.

Video Screenshot : ScreenCapture_5-16-2012 12.41.34 AM.wmv.zip

Please find the sample from the following link.

Sample Link :
Password_Flushed.zip

It would be better if you could send us a modified sample to reproduce the issue for further analysis. Also, please open an incident for the issue from Direct Trac for further follow-ups and report the issue there.

Please let us know if you need any clarification.

Thanks,
Johnson


Amber
Replied On May 17, 2012 02:20 AM

Hi Johnson,

I was referring to "password to modify" for an Excel File, not "password to open". Please look into that front too.

Amber
Replied On May 17, 2012 02:38 AM

Hi, 

I am giving the code snippet that is flushing the password:

IWorkbook workbook = XlObj.Excel.Workbooks.Open(path, ExcelParseOptions.Default);

Rajesh A [Syncfusion]
Replied On May 21, 2012 07:11 AM

Hi Amber,

Thank you for updating us.

The reported issue is not reproducing at our end. We have created another sample excel file with protected worksheet and opened as a stream. While resaving the file the password is not flushed. Please find a video screen shot of the same from the following link.

Video Screenshot: ScreenCapture_5-21-2012 6.24.50 AM.wmv

Please find the sample from the following link.

Sample Link:
Password_Flushed.zip

It would be better if you could send us a modified sample to reproduce the issue for further analysis. Also, please open an incident for the issue from Direct Trac for further follow-ups and report the issue there.

Please let us know if you need any clarification.

Thanks,
Rajesh.


Amber
Replied On May 26, 2012 10:01 AM

Hi, Rajesh,

I was referring to reading the excel sheet, not writing it. You have written an excel sheet. Please read a password protected excel sheet to check if its password is being flushed.

Rajesh A [Syncfusion]
Replied On May 29, 2012 05:52 AM

Hi Amber,

Thank you for updating us.

 

We were able to reproduce the below reported issues at our side. We have logged an issue report and forwarded to development for further analysis. So we request you to create a new direct-trac incident to further follow up on this issue.

 

Direct-Trac Link: Login

 

Please let us know if you require any further clarifications.

 

Thanks,

Rajesh. A


Amber
Replied On May 30, 2012 05:13 AM

Hi,

Just to add on to our discussion, the excel files are getting modified while reading even when I am not making or saving any changes. I am able to tell this because of the changed "Date modified" of the excel files.

Thanks,
Amber

Amber
Replied On May 30, 2012 11:04 AM

Hi, 

I have got the solution of the problem I was referring to but another issue has risen.
So the thing is:
workbook.Close(saveChanges)
I was closing the workbook as workbook.Close() rather than workbook.Close(false).. 

However now, while I am writing an Excel File, its password is getting flushed. How can I retain the password.

PS[The password I am referring to is the password to modify and not the password to open.] 

Johnson Monohar M [Syncfusion]
Replied On June 3, 2012 11:52 PM

Hi Amber,

Thank you for creating a Direct Trac incident. Kindly follow-up the issue from the incident (94971) created.

Thanks,
Johnson

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.

;