Import data from an excell workbook

SupportCommunity Automation and VBA Import data from an excell workbook

Ansicht von 3 Beiträgen - 1 bis 3 (von insgesamt 3)
  • Autor
    Beiträge
  • #12424

    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.

    Dim fExcell As ExcelFolder
    Set fExcell = ActiveDatabase.RootFolder.Object("blast2", fpObjectTypeExcelWorkbook)

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

    #8105

    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.

    Dim fExcell As ExcelFolder
    Set fExcell = ActiveDatabase.RootFolder.Object("blast2", fpObjectTypeExcelWorkbook)

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

    #8702
    Bernhard KantzBernhard Kantz
    Moderator

    You can create a ExcelDataLink.

    In VBA you could use this 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
    

    support@weisang.com

Ansicht von 3 Beiträgen - 1 bis 3 (von insgesamt 3)
  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.