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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.