Jump to content

tab-delimited


asmith

Recommended Posts

hey guys

i've made a script which creates a xls file  which exactly is tab delimited :

 


$data = "a\tb\tc\nd\te\tf";
$fp = fopen("test2.xls","a"); // $fp is now the file pointer to file $filename
if($fp){
    fwrite($fp,$data);    //    Write information to the file
    fclose($fp);  //    Close the file
    echo "File saved successfully";
} else {
    echo "Error saving file!";
}

 

when i open the created file in excel , it shows the columns perfect , no problem .  but before opening it excel asks me :

"the file you are trying to open is in a different format than specified by the file  extension,verify that the file is not corrupted and is from a trusted source before opening the file, do you want to open the file now?"

 

when i click yes, it opens and no problem .

 

the reason i'm asking this is i want to send this excel file to paypal masspay , they have requested a tab delimited file , wanted to be sure this alert excel gives me , makes no problem to the paypal scripts, so should i ignore it and continue or have to do some changes ?

 

thanks

 

 

Link to comment
https://forums.phpfreaks.com/topic/87043-tab-delimited/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.