MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

executing gawk or perl scripts using ExcelVBA

  Asked By: Carlton    Date: Jan 27    Category: MS Office    Views: 1381

I have a script and I want to make a user interface using ExcelVBA, in such
a way that it will be possible to load the input (input_v39) and to press a
button which will automatically give me the output (output_v39_transpose), is
this possible? please do not hesitate to send me a demo if you
have. Here is my script

# the file input_v39 is transposed using the follwing procedure in order to
get all #channel names on lines instead of in columns

gawk '

BEGIN { OFS= " "}

{ for ( i = 1; i <= NF; i++ ) {
a[i,NR] = $i
m = NF
n = NR
for ( j = 1; j <= m; j++ ) {
for ( k = 1; k <= n; k++ ) {
printf( "%s ", a[j,k] )

' input_v39| sort|uniq > output_v39_transpose



1 Answer Found

Answer #1    Answered By: Channarong Boonliang     Answered On: Jan 27

There is a way to transpose a matrix in Excel.

For the rest...

In which form is input_v39??? An txt, csv, tab or asc file???
Any of this forms you can in Excel directly import without problems.

If you can run your code under VBA??? I dont know!!!

Didn't find what you were looking for? Find more on executing gawk or perl scripts using ExcelVBA Or get search suggestion and latest updates.