Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Guru's can you convert this php snippet to VBA ?

Status
Not open for further replies.

stevedemo

Programmer
Mar 30, 2008
54
US
I have a routine on one of my websites that grabs a CSV file and parses it, I then extract the info I need.

$handle = fopen($csvfilename, "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
$num = count($data);
echo $data[1]." ".$num;
// so some more stuff
}
fclose($handle);

My main question is this: is there a similar command for the fgetcsv in VBA or a module I can import ?


Thanks !!

Steve

All I want is the chance to prove money won't make me happy.
 
How are ya stevedemo . . .

I don't know php but you can use the [blue]TransferText[/blue] method to import the file into fields in a table, then pick the table apart as you like. The table can be temporary or fixed.

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
TheAceMan1,

I will give that a try and let you know if I was able to make it work.

Thanks for the tip.

Steve

All I want is the chance to prove money won't make me happy.
 
stevedemo . . .

In any code module open the [blue]immediate window[/blue] (hit [blue]Ctrl + G[/blue] or select the
ImmedWin.BMP
toolbar button). Enter [blue]TransferText[/blue] (one word), put the cursor on the word and hit [blue]F1[/blue] . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top