[Libreoffice-bugs] [Bug 139936] open *.xlsx file
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Jan 28 08:11:30 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=139936
--- Comment #7 from Harald Langheinrich <Hal71229 at gmail.com> ---
the extract was too short
the options where missing
... and you can run it only once because NewWorkbook.SaveAs throws an error
when it is already there, in the content I run this part only for the first
time otherwise always open the existing one.
But I made this extract only to show how I created the file which makes the
problem at opening :
Option VBASupport 1
Option Compatible
Option explicit
Global AblageVerzeichnis As string
Global BasisVerzeichnis As String 'endet auf "/"
Global AuftragsVerzeichnis As String 'endet auf "/"
Global RechnungsVerzeichnis As String 'endet auf "/"
Global Ergebnis As Variant
Global TestErgebnis As Variant
Global BetriebsSystemName As String
Global SystemName As String
Global Settings_DateiName As String
Global existiert As Boolean
Sub Settings_sichern()
Dim NewWorkbook
BasisVerzeichnis = ActiveWorkbook.Path & GetPathSeparator()
Settings_DateiName = "Settings1.xlsx"
'make new workbook
NewWorkbook= Application.Workbooks.Add
'give it a name
NewWorkbook.SaveAs filename:= BasisVerzeichnis & Settings_DateiName ,
CreateBackup:=True'give it a name
'put data in
Workbooks(Settings_DateiName).Worksheets(1).Name="Settings-Daten"
Workbooks(Settings_DateiName).Worksheets(1).Cells(1,1).value =
"AblageVerzeichnis = "
Workbooks(Settings_DateiName).Worksheets(1).Cells(1,2).value =
AblageVerzeichnis
Workbooks(Settings_DateiName).Worksheets(1).Cells(2,1).value =
"AuftragsVerzeichnis = "
Workbooks(Settings_DateiName).Worksheets(1).Cells(2,2).value =
AuftragsVerzeichnis
Workbooks(Settings_DateiName).Save
'close it
Workbooks(Settings_DateiName).Close
end sub
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210128/af79f76f/attachment.htm>
More information about the Libreoffice-bugs
mailing list