asmith Posted January 21, 2008 Share Posted January 21, 2008 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 More sharing options...
asmith Posted January 21, 2008 Author Share Posted January 21, 2008 i'll just test it with sand-box and see what happens... Link to comment https://forums.phpfreaks.com/topic/87043-tab-delimited/#findComment-445249 Share on other sites More sharing options...
effigy Posted January 21, 2008 Share Posted January 21, 2008 Even though Excel can open tab-delimited files, the .xls extension is solely for Excel files. How about .txt? Link to comment https://forums.phpfreaks.com/topic/87043-tab-delimited/#findComment-445263 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.