lakshmiramya Posted March 15, 2011 Share Posted March 15, 2011 Hello, i am currently getting an Microsoft Excel formatted text file whose save type is .Txt from a URL.I used to open it and will change the save type as excel file. Please suggest whether we can do this with php code. currently my code is like this, <? php copy("http://www.faa.gov/airports/airport_safety/airportdata_5010/menu/emergencyplanexport.cfm?Region=&District=&State=&County=&City=LAS%20VEGAS&Use=&Certification=","./contactsexport.xls"); ?> where as the contactsexport.xls type is .Txt which i need it in .xls Thanks in Advance. Link to comment https://forums.phpfreaks.com/topic/230695-converting-microsoft-excel-formatted-text-file-as-an-excel-file/ Share on other sites More sharing options...
kenrbnsn Posted March 15, 2011 Share Posted March 15, 2011 The file you're retrieving is a tab delimited csv file. It is not a excel formated file. Copy it to a file with the extension ".csv", then you can import it into Excel. Ken Link to comment https://forums.phpfreaks.com/topic/230695-converting-microsoft-excel-formatted-text-file-as-an-excel-file/#findComment-1187762 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.