cannot write to worksheet in excel file with vba code

  • Thread starter Thread starter Pritesh3
  • Start date Start date
P

Pritesh3

Guest
Hi,

I'm trying to write some standard data into rows in a worksheet.

The problem is this file is quite old (.xls). and it contains worksheets with vba.

Using interop. I cannot access the wroksheet. using epplus. I get an error specified index "-1" is not found.

i just tried closedxml. It doesnt fail but no data is also written to the sheet.

I'm not sure what to do.

To use epplus and closedxml I saved the file as .xlsm because i don't think they work with .xls

Any ideas what i can try to write to this excel files.

Also the code im using is not "bad". I can write to standard excel with no vba in it no problem.

Anyone ever encountered this? My preference would be to keep to file "as is" (.xls) but happy with .xlsm if I can find a solution to make it work.

Thanks.

Pritesh

Continue reading...
 
Back
Top