Page 1 of 1

add in sheet in exist excel file

Posted: 10 Apr 2010 23:58
by jamesfui
hi everyone. need help in what is the bat scripts to add in
texts into sheets of an existing excel file without overwriting it?

for example,
text.txt
-----------------content------------------
jan09 report
feb10 report
...etc
-----------------content end--------------

INTO NEW SHEET OF EXISTING EXCEL FILE shown as below,

exist_excel.xls
-------------------content------------------------
jan09 report
feb10 report
...etc


Sheet | Sheet1 | Sheet2 | Sheet3

--------------------content end-------------------

PS. the contents in Sheet1, Sheet2, etc will not be overwritten!
which means their existing contents will not be empty out..

thanks in advance!! :D

Re: add in sheet in exist excel file

Posted: 11 Apr 2010 00:08
by ghostmachine4
you will to use vbscript , or a programming language that provides excel API/module for creating sheets. Search google for "vbscript add excel worksheet" and you can find examples on how to add worksheet.