Hi friends,
i am writing the code for transfering the data from notepad to excel in vbscript(.vbs extension) and when i double click on that the data is transfered it works fine.Same thing i want to want to call the script with c#.net code like
process.start("g:\\abc.vbs");
at this this the data is not send to the excel sheet and again i want to read the data from excel to oracle database at that time it is showing ur excel file does not open and no data error.How can i solve this code?
can any one try this in script and call with c#.net
Loading
Javeed M ShaikhPosted Oct 12, 2011, 11:19 PM
Please try the following to call vbscript from C# code:
System.Diagnostics.Process.Start(@"cscript //B //Nologo g:\abc.vbs");
If copying data from excel to oracle is just one time activity than i would suggest to save your excel sheet as CSV and use Oracle Control file to BULK load the data in Oracle, if this is an ongoing activity than please follow the following steps:
1. Create an Excel Object and read the excel sheet.
2. Convert the Excel Sheet in datatable/dataset and call oracle procedure to insert the data from datatable.
Share your code to understand us better.
Please do not forget to mark "Accepted Answer".