Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
swatib
Posting Yak Master
173 Posts |
Posted - 2005-12-15 : 05:03:19
|
Hi AllI have a File Upload control to select a file and want to open that selected file in its editor. how can I do this?Please help me outNjoy Life  |
|
surendrakalekar
Posting Yak Master
120 Posts |
Posted - 2005-12-15 : 05:14:55
|
There are few API calls to do so. That API may be LOAD para1, para2 .....Surendra |
 |
|
swatib
Posting Yak Master
173 Posts |
Posted - 2005-12-15 : 05:20:00
|
Can you please clarify ur answer?Njoy Life |
 |
|
surendrakalekar
Posting Yak Master
120 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-15 : 06:00:35
|
Check out some sample codes at www.codeproject.comwww.asp.netMadhivananFailing to plan is Planning to fail |
 |
|
swatib
Posting Yak Master
173 Posts |
Posted - 2005-12-16 : 05:35:51
|
I found following code:First, you should add the reference "Microsoft Excel Object Library"Dim xlApp Excel.ApplicationDim xlBook As Excel.Workbook'Create an Excel application objectxlApp = CType(CreateObject("Excel.Application"), Excel.Application)'Make MS Excel Application visible to the user'You could make it False, so the Excel file will be opened as hiddenxlApp.Visible = True'Load your Excel file to a Workbook objectxlBook = xlApp.Workbooks.Open("F:\called.xls")-----------This code run successfully but If I give variable that contains the path as parameter in the last statement then not working. What should I do?Njoy Life |
 |
|
surendrakalekar
Posting Yak Master
120 Posts |
Posted - 2005-12-16 : 05:41:24
|
Whether you want to open only Excel files?or all types of files like.. doc, ppt, txt, html, bmp, jpg, pdf, autocad... etc.. etc..Surendra |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-12-16 : 07:14:31
|
TryxlBook = xlApp.Workbooks.Open('" & variable & "')MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|