Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.