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!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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