Jump to content

send a web table to an excel sheet via odbc and sql


sonyk

Recommended Posts

Hello to all

 

Here is the headache:

 

I want to make a website. In this website there is a table with multiple columns and rows. The cells of the table are editable by the user on the web. After filling the cells with numbers, the user clicks a button and the table is sent to an existing (but blank) excel spreadsheet.

 

I have the website and i am trying to understand the code beneath this. This is for my graduation paperwork and the schedule is very tight.

 

If you can teach me how to this I would be most grateful:

 

How to make a php script that transfers all the data in a table to an excel sheet? I am using ODBC connection and sql language like this one:

 

<?php

$ligacao=odbc_pconnect("test","","") or die ("error");

$sql="INSERT INTO [sheet$](F1) VALUES ('value1')";

$resultado=odbc_exec($ligacao,$sql);

echo $resultado;

odbc_close($ligacao);

?>

 

Thank you a lot!

 

Archived

This topic is now archived and is closed to further replies.

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