Who clear the MS Macro sheet content?

K

King

Dear All,

I have an excel file, which includes a MS Macro sheet. some parameters are
entered the Macro sheet.

In order to export data to that excel file,

I use OleDbConnection to connect with a MS excel file, then use
OleDbCommand::ExecuteNonQuery to write that excel file. my data can be write
to excel file, correctly.
The problem is that, the content of original Macro sheet has been cleared,
my parameter data are disappeared. I need to enter the parameter data to that
excel again.
Could i use program to copy that parameter data?
why OleDbcommand affects the macro?
Any suggestions from you are appreciated. Thank you very much.
 
J

joel

I don't know you entire code so I will make on;u suggestions.

the microsoft website says the following

-------------------------------------------------------------------------
An OleDbConnection object represents a unique connection to a dat
source. With a client/server database system, it is equivalent to
network connection to the server. Depending on the functionalit
supported by the native OLE DB provider, some methods or properties o
an OleDbConnection object may not be available.

When you create an instance of OleDbConnection, all properties are se
to their initial values. For a list of these values, see th
OleDbConnection constructor.
 

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