Click here to Skip to main content
15,913,854 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionMake image jump up using vb6.0 Pin
Otekpo Emmanuel22-May-14 14:21
Otekpo Emmanuel22-May-14 14:21 
AnswerRe: Make image jump up using vb6.0 Pin
Eddy Vluggen23-May-14 7:34
professionalEddy Vluggen23-May-14 7:34 
Questioncalling c dll that contains structures from VB6 Pin
Khaled_Eissa22-May-14 6:53
Khaled_Eissa22-May-14 6:53 
AnswerRe: calling c dll that contains structures from VB6 Pin
Eddy Vluggen23-May-14 7:33
professionalEddy Vluggen23-May-14 7:33 
QuestionSpeech(Audio file ) To Text file in VB.Net Pin
Member 1041929722-May-14 3:35
Member 1041929722-May-14 3:35 
AnswerRe: Speech(Audio file ) To Text file in VB.Net Pin
Richard MacCutchan22-May-14 3:56
mveRichard MacCutchan22-May-14 3:56 
AnswerRe: Speech(Audio file ) To Text file in VB.Net Pin
Dave Kreskowiak22-May-14 4:18
mveDave Kreskowiak22-May-14 4:18 
QuestionDetect if a messagebox is shown Pin
dilkonika22-May-14 1:26
dilkonika22-May-14 1:26 
AnswerRe: Detect if a messagebox is shown Pin
Dave Kreskowiak22-May-14 4:17
mveDave Kreskowiak22-May-14 4:17 
GeneralRe: Detect if a messagebox is shown Pin
dilkonika22-May-14 4:46
dilkonika22-May-14 4:46 
GeneralRe: Detect if a messagebox is shown Pin
Eddy Vluggen22-May-14 9:11
professionalEddy Vluggen22-May-14 9:11 
GeneralRe: Detect if a messagebox is shown Pin
dilkonika22-May-14 9:48
dilkonika22-May-14 9:48 
GeneralRe: Detect if a messagebox is shown Pin
Eddy Vluggen22-May-14 22:31
professionalEddy Vluggen22-May-14 22:31 
GeneralRe: Detect if a messagebox is shown Pin
Dave Kreskowiak22-May-14 11:11
mveDave Kreskowiak22-May-14 11:11 
GeneralRe: Detect if a messagebox is shown Pin
Dave Kreskowiak22-May-14 11:11
mveDave Kreskowiak22-May-14 11:11 
GeneralRe: Detect if a messagebox is shown Pin
dilkonika22-May-14 13:50
dilkonika22-May-14 13:50 
QuestionLoad method with file URL file location reference Pin
Member 1066669819-May-14 22:33
Member 1066669819-May-14 22:33 
AnswerRe: Load method with file URL file location reference Pin
Eddy Vluggen20-May-14 5:23
professionalEddy Vluggen20-May-14 5:23 
GeneralRe: Load method with file URL file location reference Pin
Member 1066669820-May-14 5:44
Member 1066669820-May-14 5:44 
QuestionListing Directory using FTPwebrequest and updating DB tables Pin
Sachin k Rajput 19-May-14 3:33
Sachin k Rajput 19-May-14 3:33 
QuestionVBScript: Conversion XML to Excel Pin
Member 1066669818-May-14 21:39
Member 1066669818-May-14 21:39 
AnswerRe: VBScript: Conversion XML to Excel Pin
Chris Quinn18-May-14 22:52
Chris Quinn18-May-14 22:52 
GeneralRe: VBScript: Conversion XML to Excel Pin
Member 1066669818-May-14 23:05
Member 1066669818-May-14 23:05 
GeneralRe: VBScript: Conversion XML to Excel Pin
Chris Quinn18-May-14 23:32
Chris Quinn18-May-14 23:32 
GeneralRe: VBScript: Conversion XML to Excel Pin
Member 1066669819-May-14 1:10
Member 1066669819-May-14 1:10 
Okay, slowly getting there. This is what I have:

VB
Dim xlApp, xlWkb, SourceFolder,TargetFolder,file
Set xlApp = CreateObject("excel.application")
Set fs = CreateObject("Scripting.FileSystemObject")

Const xlNormal=1

filestr="D:\some directory\some file.xml"
TargetFolder="D:\some directory\xls"

xlApp.Visible = False

Set xlApp = CreateObject("Excel.Application")
Set xlWkb = xlApp.Workbooks.OpenXML(filestr, Array(1), 2)
BaseName= fs.getbasename(filestr)
FullTargetPath=TargetFolder & "\" & BaseName & ".xls"
xlWkb.SaveAs FullTargetPath, xlNormal
xlWkb.close

Set xlWkb = Nothing
Set xlApp = Nothing
Set fs = Nothing

End Sub


This will open the XML fiel, apply the style sheet and save it as a workbook. However, the code is interrupted by the opo-up window in Ezxcel prompting the user to apply the XSL fiel or not. The code continues only after clicking 'OK'. The code needs to run uninterrupted. Parameter 3 of OpenXML should be the load method: 2 = xlXmlLoadImportToList. Not sure I am using the correct parameter?

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.