FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder
Products and Solutions
Support and Downloads
Company
Magazine
Contact Us
Language
MyWeisang

Account settings

Topic

Import data from an excell workbook

Home page Community Automation and VBA Import data from an excell workbook

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34991
    Nicolas Beaupré
    Participant

    I got an excell workbook “blast2” witch is inserted in my database. I want to access the data in it or import it in DataSets. This workbook as more than one sheet. I’ve put an exemple of that workbook in attachment.

    I’ve created an ExcelFolder object that way and it refer to the correct element.
    [code]Dim fExcell As ExcelFolder
    Set fExcell = ActiveDatabase.RootFolder.Object(“blast2”, fpObjectTypeExcelWorkbook)[/code]

    How can I access, for exemple, the data in the C:5 cell of the tir1 sheet ?

    #34993
    Nicolas Beaupré
    Participant

    I got an excell workbook “blast2” witch is inserted in my database. I want to access the data in it or import it in DataSets. This workbook as more than one sheet. I’ve put an exemple of that workbook in attachment.

    I’ve created an ExcelFolder object that way and it refer to the correct element.
    [code]Dim fExcell As ExcelFolder
    Set fExcell = ActiveDatabase.RootFolder.Object(“blast2”, fpObjectTypeExcelWorkbook)[/code]

    How can I access, for exemple, the data in the C:5 cell of the tir1 sheet ?

    #34992
    Bernhard Kantz
    Participant

    You can create a [b]ExcelDataLink[/b].

    In VBA you could use this code:
    [code]
    Dim oExcel As ExcelFolder
    Set oExcel = ActiveDatabase.RootFolder.Object(“blast2”, fpObjectTypeExcelWorkbook)
    With oExcel.Add(“data”, fpObjectTypeExcelDataLink)
    .YComponent = “tir1!C5”
    .YLineByLine = True
    ‘.Evaluate
    .Update
    End With
    [/code]
    support@weisang.com

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.