Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Need to convert some VB to perl

Reply
Thread Tools

Need to convert some VB to perl

 
 
paul.porcelli@scottishwater.co.uk
Guest
Posts: n/a
 
      08-03-2005
Hi there,
I need to convert the code below to perl.
I have had may attempts but am still not there.

Any advice/help will be much appreciated.
Thanks.
Paul

With
ActiveSheet.QueryTables.Add(Connection:="TEXT;H:\P rojects\Performance
Improvement\acc_res.030805", Destination:=Range("A1"))
.Name = "acc_res.030805"
.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 = True
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
Columns("A:A").ColumnWidth = 16.86

 
Reply With Quote
 
 
 
 
Mark Clements
Guest
Posts: n/a
 
      08-03-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi there,
> I need to convert the code below to perl.
> I have had may attempts but am still not there.
>
> Any advice/help will be much appreciated.


<snip>

What have you tried so far?

>
> With
> ActiveSheet.QueryTables.Add(Connection:="TEXT;H:\P rojects\Performance
> Improvement\acc_res.030805", Destination:=Range("A1"))
> .Name = "acc_res.030805"
> .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 = True
> .TextFileTabDelimiter = True
> .TextFileSemicolonDelimiter = False
> .TextFileCommaDelimiter = False
> .TextFileSpaceDelimiter = True
> .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1)
> .TextFileTrailingMinusNumbers = True
> .Refresh BackgroundQuery:=False
> End With
> Columns("A:A").ColumnWidth = 16.86
>


At first glance:

check out Win32::OLE for driving eg Excel

but it really depends on what your requirements are. If you just want to
retrieve the data and manipulate it with Perl then there are other ways
of doing it eg LWP and HTML::TableExtract.

What exactly is it you want to do?

Mark
 
Reply With Quote
 
 
 
 
kdp
Guest
Posts: n/a
 
      08-04-2005
>From the looks of your snippet, you are looking to grab all the
valid data in column A1 of an Excel spreadsheet. This can
certainly be done in Perl, but the question must be asked: how
familiar are you with the Perl language?

-keith

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i convert my perl script to be a perl module? georg.heiss@gmx.de Perl Misc 4 02-10-2009 06:21 PM
I need some help with java to convert sound‏ CGmancp32 Java 0 12-27-2008 11:07 AM
Convert perl/ cgi web app to standalone perl app learnerplates Perl Misc 8 06-08-2005 05:11 PM
Need some help for some perl homework.... Perl 0 02-25-2004 01:45 AM
Do I need to Convert with Convert.ToInt32(session("myNumber")) ? Andreas Klemt ASP .Net 1 07-23-2003 02:59 PM



Advertisments