Home > Software engineering >  VBA object (e.g., sheet1) deposited in the database, how to do?
VBA object (e.g., sheet1) deposited in the database, how to do?

Time:10-05

Sheet1 list content is too much and too complicated is too complex, want to what is inside the cell one by one in the database, add up the number of fields are almost 200, is not scientific, so I was thinking about, and whether the sheet1 as an object, the object instances of binary content stored in the database, not find a way,
If you would have a XXX. The.xls files shall be deposited in the database, this is a very simple thing, but I don't want to do so, a lot of reasons, in all that they can't do it,

Another note, I was in the.xls files directly the VBA development, there are some buttons on sheet1 to "save" "submit" to extract "database operations, such as" of course there are many other table, such as in this workbook sheet2, sheet3... Needs to be in the proper operating conditions database to store or change to delete,

CodePudding user response:

Haven't the sofa for a long time!

CodePudding user response:

I know that if the excel in addition to the VBA inside, if there are VCA, it is very easy to implement this feature, but, alas!!!!! , here is my thought VBA++ code:
Private Sub test ()
Dim temp () as Byte
Dim nLen as Integer
NLen=ObjLen (thisworkbook sheet1)
ReDim temp (0 to nLen - 1)
Copymemory PRT (temp (0)), objprt (thisworkbook. Sheet1), nLen
'here, I will temp in the array of bytes contents with the ADODB library. The Write method of Stream written to the database in the

End Sub

CodePudding user response:

Please translate this VBA++ pseudo code into effective code, thank you!

CodePudding user response:

Why don't you directly to the XLS or XLSX file saved to the database?

CodePudding user response:

Excel is in itself a database, but also put into the database, not to complicate the simple things?
  •  Tags:  
  • VBA
  • Related