Hi ya NcNeil
I have been away for awhile a much needed break from programming in general.
Excel went downhill after the .XLS format was obsoleted.
Excel was my go to for number crunching because I could do graphs easily with maths
Well the Excel as found in Office 2003 was XLS and you can't get Office 2003 anymore even as a download...
I am wondering whether anyone has looked into interacting with Excel files (reading and/or writing), preferably in the .xlsx format but .ods (OpenDocument Spreadsheet) format would be useful too. I use CSV files a lot (readable and writable by Excel) but could really use a way to read and write directly to XLSX.
Has anyone tried this or does anyone have any suggestions or pointers to how it can be done? I would be happy if I could get as far as just reading and writing data to cells. Accessing formatting and graphs and such is not as important.
Thanks in advance for any input.
LM
' Write to Excel file from vbscript
Dim xlApplication ' As Excel.Application
Dim xlWorkbook ' As Excel.Workbook
Dim sFile ' As String
sFile = "C:\Temp\MyWorkbook.xlsx"
Set xlApplication = CreateObject("Excel.Application")
xlApplication.Visible = False
On Error Resume Next
Set xlWorkbook = xlApplication.Workbooks.Open(sFile)
If Err.Number <> 0 Then
MsgBox "Error #" & CStr(Err.Number) & ": " & Err.Description
Err.Clear
Else
'manipulate file, like:
xlApplication.Cells(1,2).Value = 255 ' Set row 1, column 2 to 255
xlWorkbook.Save
'etc.
End If
On Error Goto 0
xlApplication.Quit
xlWorkbook.Close False
Set xlWorkbook = Nothing
Set xlApplication = Nothing
When did XLS get obsoleted? Did I miss something? (As I said, I don't hardly ever use Excel or Power Point -- almost all my work is always in Word.)
From QB64 to XL, an other way could be using _clipboard$ (for one value at time )
<si>
<t>Name,First</t>
</si>
<si>
<t>Name,Last</t>
</si>
<si>
<t>Age</t>
</si>
<si>
<t>Sex</t>
</si>
<si>
<t>Junk</t>
</si>