problem saving Excel to xml using c#

D

dj1paul

Hi

I am trying to save worksheets in a excel file individually to xml.
Many of the worksheets contain images and charts. Since images and
charts cannot be stored in xml, everytime i execute the code a yesno
dialog appears asking whether to continue saving. my excel workbook
contains over 50 worksheets with images and charts, therefore clicking
on yes 50 times or more, is not viable.... is there a way out for this.


thx in advance....
 
C

Cindy M -WordMVP-

I am trying to save worksheets in a excel file individually to xml.
Many of the worksheets contain images and charts. Since images and
charts cannot be stored in xml, everytime i execute the code a yesno
dialog appears asking whether to continue saving. my excel workbook
contains over 50 worksheets with images and charts, therefore clicking
on yes 50 times or more, is not viable.... is there a way out for this.
Excel has a pretty effective DisplayAlerts. Have you tried that?

If it doesn't affect this message, then the "cleanest" way would be to
cycle through the collections and delete these things before saving, so
that the message doesn't appear.

Beyond that, the only way to get rid of dialog boxes without user
intervention:
How To: Dismiss a Dialog Box Displayed by an Office Application with
Visual Basic.NET
http://support.microsoft.com/default.aspx?scid=kb;en-us;307292

For a Microsoft Visual Basic C++ version of this article, see
310744


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top