Re: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file
Thanks for responding, Torsten. If I'm understanding your suggestion, then what happens where the data from the dB already has a ; (semi-colon) in it? Wouldn't this corrupt the import into excel? dave My question is whether there might be a more direct way to get the dB data into excel on the client PC (can't imagine how), or if not, how I might create a 'tab delimited' file from the HTML table and avoid introducing a foreign character as a field separator. A comma seperated values file (.csv) should be readable by Excel. Just put a ; between all values and save it as a text file with .csv extension. I think you don't need to go all the way via HTML output and copy/paste. Regards, Torsten Roehr
Re: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ... Thanks for responding, Torsten. If I'm understanding your suggestion, then what happens where the data from the dB already has a ; (semi-colon) in it? Wouldn't this corrupt the import into excel? This might cause a problem because Excel will start a new row then - this could also happen with a tab delimiter. At the moment I can't think of a solution for this. Is it probable that your data contains semicolons? Regards, Torsten -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file
You could just use MysqlODBC, and import the data right into the excel sheet. Just setup a DNS that points to your Mysql server, on the windows box, then select Data-Get External data-New Database Query within Excel... I'm not sure what the data is, or why you need the data, or what your really doing But that might be in option... Cheers!! Dan -Original Message- From: roehr [mailto:[EMAIL PROTECTED] Sent: Monday, May 24, 2004 9:47 AM To: php-db Subject: Re: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ... Thanks for responding, Torsten. If I'm understanding your suggestion, then what happens where the data from the dB already has a ; (semi-colon) in it? Wouldn't this corrupt the import into excel? This might cause a problem because Excel will start a new row then - this could also happen with a tab delimiter. At the moment I can't think of a solution for this. Is it probable that your data contains semicolons? Regards, Torsten -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] ... Thanks for responding, Torsten. If I'm understanding your suggestion, then what happens where the data from the dB already has a ; (semi-colon) in it? Wouldn't this corrupt the import into excel? Please take a look at PEAR's Spreadsheet Excel Writer package: http://pear.php.net/package/Spreadsheet_Excel_Writer Of course it's more work than just putting together a string with all values but it might solve the ; problem. Regards, Torsten -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file
There definitely are colons, and there is a 'comments' field and semi-colons may appear there. However I think I will include a note in the help file for the admin to avoid using semi-colons in this field. Seems the best solution. And you are right: A .csv is seen as an excel file, so opening the audit window then going to file save as, and making the file Audit.csv, or something, avoids having to use the import wizard in excel. Saves several steps. Thanks so much! dave Thanks for responding, Torsten. If I'm understanding your suggestion, then what happens where the data from the dB already has a ; (semi-colon) in it? Wouldn't this corrupt the import into excel? This might cause a problem because Excel will start a new row then - this could also happen with a tab delimiter. At the moment I can't think of a solution for this. Is it probable that your data contains semicolons? Regards, Torsten
Re: [PHP-DB] Re: Convert HTML Table to Tab Delimited .TXT file
Thanks, Christian, and all who responded. I think this is almost exactly as it will work. The problem with using some kind of MySQL frontend is that this would involve some knowledge of dB's and SQL (can't be certain of this), and that it would be additional steps. For example, the GUI already allows 1 or more computers to be selected (up to 48, now), and the audit history button simply queries the audit_table based upon the same selection of computers for all changes made during a specified period. Having to create a query for computers 1-7, 11, 15, 16, 24, 31, etc, where start date = 'some date' and end date = now() would really be dupliating work that the GUI is already doing. An easy way to do it (work around) is to dump it as csv or html. If your form can output an html table to the browser to show results then all you need is to include a short instruction on the html form that has all results in html table that would say something like Save with your browser's 'save as' button and save it as a HTM file then open it with Excel Then the user would easily open an HTML file in XLS and do what ever they want with it (save as XLS, WK*, etc It gets more complicated if you want to use formulas in the spreadsheet but if its just raw data this would be a very easy way to accomplish what you want. Hope this helps. Christian