Message 1 of 2
How to create a New Microsoft Excel Worksheet file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I want to create a New Microsoft Excel Worksheet file.
Call createFile("c:\myproject\file.xlsx")
Function createFile(path)
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Dim Fileout As Object
If FileExists(path) Then
Else
Set Fileout = fso.CreateTextFile(path, True, True)
Fileout.Write "your string goes 54545645464here"
Fileout.Close
End If
End Function
but it create file but I cannot open it.