Hi,
I am not an experienced user and I have a problem writing output from a simulation model to a .wks format file. I get VBA to make the file and write data in it. Until now I have made the following code, but it only writes data to the first column. Can anybody tell me how to write data to the second and third etc columns?
Writing to an excel file is not possible because of file corruption caused by the simulation software.
Below the code I have tried sofar. But everything I write ends op cramped in first column.
Thanks a lot for your help!
I am not an experienced user and I have a problem writing output from a simulation model to a .wks format file. I get VBA to make the file and write data in it. Until now I have made the following code, but it only writes data to the first column. Can anybody tell me how to write data to the second and third etc columns?
Writing to an excel file is not possible because of file corruption caused by the simulation software.
Below the code I have tried sofar. But everything I write ends op cramped in first column.
Thanks a lot for your help!
Code:
Open "test.wks" For Output As #1
Write #1, OutputFileName
Write #1, 'Write blank line.
Write #1, 'Write blank line.
Write #1, 1, 2
Write #1, 1; Tab(10); 2
Print #1, "This is a test" ' Print text to file.
Print #1, ' Print blank line to file.
Print #1, "Zone 1"; Tab; "Zone 2" ' Print in two print zones.
Print #1, "Hello"; " "; "World" ' Separate strings with space.
Print #1, Spc(5); "5 leading spaces " ' Print five leading spaces.
Print #1, Tab(10); "Hello" ' Print word at column 10.
close #1