diff options
Diffstat (limited to 'testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc')
-rwxr-xr-x | testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc b/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc index 87c6d899b7bb..6f8392adf93d 100755 --- a/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc +++ b/testautomation/spreadsheet/optional/includes/import_general/c_import_general.inc @@ -41,6 +41,8 @@ sub tLoadAllDocuments ( gsSourcePath as string ) Dim i as integer Dim x as integer + dim gsSourceDocument( 50 ) as string + printlog "Source path: " & gsSourcePath 'Get the files into a list. Call GetAllFileList(gsSourcePath, "*.*" , gsSourceDocument()) @@ -81,6 +83,7 @@ end function '------------------------------------------------------------------------------- ' testcase tLoadSpreadsheetDocument (SourceFile) + Dim sOnlyFileName as string Dim sOnlyFileExtension as string Dim sTempFileName as String @@ -88,13 +91,13 @@ testcase tLoadSpreadsheetDocument (SourceFile) sTempFileName = SourceFile sOnlyFileName = DateiOhneExt(DateiExtract(SourceFile) - sOnlyFileExtension = GetExtention(sTempFileName) - select case sOnlyFileName - case "so3tmpl", "so4tmpl", "so5tmpl" : - printlog "Test case: " & sOnlyFileName & "." & sOnlyFileExtension - - case else printlog "Test case: " & sOnlyFileName & "." & sOnlyFileExtension + sOnlyFileExtension = GetExtention(sTempFileName) + + select case ( sOnlyFileName ) + case "so3tmpl", "so4tmpl", "so5tmpl" : printlog "Test case: " & sOnlyFileName & "." & sOnlyFileExtension + case else : printlog "Test case: " & sOnlyFileName & "." & sOnlyFileExtension end select + 'Maybe file name is empty if sOnlyFileName > "" then 'Some extensions make no sense to load @@ -106,27 +109,15 @@ testcase tLoadSpreadsheetDocument (SourceFile) Call hCloseDocument else warnlog sOnlyFileName + " document has not been loaded correctly [hIsNamedDocLoaded]!" - if GetDocumentCount > 1 then - Do Until GetDocumentCount = 1 - Call hCloseDocument - Loop - endif + hFileCloseAll() endif else warnlog sOnlyFileName + " document has not been loaded correctly [fCalcFileOpen; IsItLoaded]!" - if GetDocumentCount > 1 then - Do Until GetDocumentCount = 1 - Call hCloseDocument - Loop - endif + hFileCloseAll() endif else printlog "(" + sOnlyFileName + "." + sOnlyFileExtension + ") won't be loaded because of excluded extensions .so and .tmp." - if GetDocumentCount > 1 then - Do Until GetDocumentCount = 1 - Call hCloseDocument - Loop - endif + hFileCloseAll() endif endif endcase |