- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please excuse my poor english first.
I try to set values of a column in Excel sheet using a single dimension array, but failed.
All the fields of that column will appear to be same as the first entry of that array. Certainly I can set value of the column by one cell a time, but it is not convinient.
If I operate on row, there is no problem.
Code:
CALL VariantInit(vBSTR) vBSTR%VT = VT_BSTR bstr = ConvertStringToBSTR("A1:A10") vBSTR%VU%PTR_VAL = bstr range = $Worksheet_GetRange(worksheet, vBSTR, $STATUS =status) CALL Check_Status(status, " Unable to get RANGE object") status = VariantClear(vBSTR) status = AUTOSETPROPERTY (range, "VALUE", A)
Anybody knows how to deal with that except usingf90vb?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe this is a known bug, I've seen other references to it, and found the same problem. I just bit the bullet and once I have the range object, get the row and col counts, and step through the cells one by one. Not elegant, but the same code lets you deal with 2d arrays in any order as well.
Ian
![](/skins/images/71A9511A625CE5D5D45FB59952A4AA71/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page