klaus General User

Joined: 08 May 2006 Posts: 28 Location: germany
|
Posted: Sun Mar 11, 2007 12:49 pm Post subject: link to a csv-file at a defined cellposition |
|
|
hallo
with following code is it possible to get datas from a csv-file:
| Code: | Sub LinkCSV
Dim LinkModus ' Linkmodus beim Import
Dim NoLink 'Variable für die Auflösung des Linkmodus'
Dim aktivesBlatt as Object
'--Variablen/Parameter für den Import
Dim strPfad as String 'Variable zur Übergabe des Dateipfades
Dim strQuelltabelle as String
Dim strImportFormat as String 'Variable für das Dateiformat
Dim strImportOptionen as String ' Variable für den Zeichensatz etc.
Dim strLinkInfo as String
aktivesBlatt=thisComponent.CurrentController.getActiveSheet
strPfad="K:\Finanzen\Konotauszüge\656496.csv"
strQuelltabelle = ""
strImportFormat = ""
strImportOptionen = "44" 'ordnet den für Umlaute und Sonderzeichen richtigen Zeichensatz zu
LinkModus = com.sun.star.sheet.SheetLinkMode.NORMAL
aktivesBlatt.link(strPfad, strQuelltabelle, strImportFormat, strImportOptionen, LinkModus)
LinkModus = com.sun.star.sheet.SheetLinkMode.NONE 'Link auflösen
End Sub |
my problem is to put the data at the next empty cell of the activesheet. is this possible?
reards
klaus |
|