POV-Ray : Newsgroups : povray.off-topic : A solution in search of a problem : Re: A solution in search of a problem Server Time
28 Jul 2024 18:14:45 EDT (-0400)
  Re: A solution in search of a problem  
From: Stephen
Date: 23 Jun 2013 11:04:43
Message: <51c70e8b$1@news.povray.org>
On 23/06/2013 3:29 PM, Le_Forgeron wrote:
> Excel... isn't there some macro language in that flipper ? (or is it a
> flight simulator ? or doom-like ?)

Yes there is. Andrew can record a macro then either edit it to be able 
to change the name of the file of keep the name of the input file the same.

Sample code:


Sub Macro6()
'
' Macro6 Macro
'

'
     Columns("A:B").Select
     With ActiveSheet.QueryTables.Add(Connection:= _
         "TEXT;C:\Users\Stephen\Documents\Book2.csv", 
Destination:=Range("$A$1"))
         .Name = "Book2_1"
         .FieldNames = True
         .RowNumbers = False
         .FillAdjacentFormulas = False
         .PreserveFormatting = True
         .RefreshOnFileOpen = False
         .RefreshStyle = xlInsertDeleteCells
         .SavePassword = False
         .SaveData = True
         .AdjustColumnWidth = True
         .RefreshPeriod = 0
         .TextFilePromptOnRefresh = False
         .TextFilePlatform = 850
         .TextFileStartRow = 1
         .TextFileParseType = xlDelimited
         .TextFileTextQualifier = xlTextQualifierDoubleQuote
         .TextFileConsecutiveDelimiter = False
         .TextFileTabDelimiter = True
         .TextFileSemicolonDelimiter = False
         .TextFileCommaDelimiter = True
         .TextFileSpaceDelimiter = False
         .TextFileColumnDataTypes = Array(1, 1)
         .TextFileTrailingMinusNumbers = True
         .Refresh BackgroundQuery:=False
     End With
     ActiveSheet.Shapes.AddChart.Select
     ActiveChart.ChartType = xlXYScatterLinesNoMarkers
     ActiveChart.SetSourceData Source:=Range("Sheet4!$A:$B")
End Sub


-- 
Regards
     Stephen


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.