ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reading current opened Excel book(file) into streams (https://www.excelbanter.com/excel-programming/394075-reading-current-opened-excel-book-file-into-streams.html)

Malleswar

Reading current opened Excel book(file) into streams
 
Hi,

I want to read the currently opened file into streams.

If user is open Excel and creates a new file, and then
clicks on a button (which is provided by me) then I want to send that file
to my server. How to retrieve the that file into streams. some times he might
not have saved the currently opened file.

I am using VSTO wit h visual studio with C# and I am mainly targeting
Word/Excel/Powerpoint-2003.

Thanks in Advance

NickHK

Reading current opened Excel book(file) into streams
 
I don't know what the Excel interface exposes in your environment, but
attempting to read such a "stream" would be highly dangerous (if at all
possible) I would imagine, as you have no idea what state the WB is in.
Quite why you want to save WBs that the user does not want to save is
curious/dubious, but...

You could do a .SaveCopyAs, then sent that copy to your server I suppose.

NickHK

"Malleswar" wrote in message
...
Hi,

I want to read the currently opened file into streams.

If user is open Excel and creates a new file, and then
clicks on a button (which is provided by me) then I want to send that file
to my server. How to retrieve the that file into streams. some times he

might
not have saved the currently opened file.

I am using VSTO wit h visual studio with C# and I am mainly targeting
Word/Excel/Powerpoint-2003.

Thanks in Advance





All times are GMT +1. The time now is 05:48 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com