Jump to content

Search the Community

Showing results for tags 'google-spreadsheet'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 1 result

  1. http://stackoverflow.com/q/26809213/4080419 GOAL: To have multiple people edit a Google Spreadsheet and have all edits display on a webpage (not Google site) where my css takes over the formatting and display of the content coming from the Spreadsheet. PROBLEM: I am brand new to PHP, as in I've been doing tutorials all week and this is my first time working with it. Likewise, I'm brand new to Google API's and don't fully understand how they work. I don't know what code to use or really how to modify it. WHAT I'VE TRIED: Google API obviously has the code for how to fetch the data to put into a page, so I've copied this, though I don't know if I put it in correctly/Dreamweaver says "There is a syntax error on line 32. Code hinting may not work until you fix this error". Additionally, I've read that perhaps Google Fusion Tables might be better because I can download it as a CSV version and then have that be what used in my actual script (though I don't fully understand how/if that would continually update itelf?): <html xmlns="http://www.w3.org/1999/xhtml"><head><title>Untitled Document</title><!--#include file="php-5.6.2.tar.bz2" --><?php include("php-5.6.2.tar.bz2"); ?><style type="text/css">#page {margin-left:auto;margin-right: auto;top: 15%;bottom: 15%;width: 1000px;}.menue {border-color:rgb(0,0,0);border-width:thick;height:300px;width: 300px;position: abosolute;margin-left: 10%;margin-right: 10%;}</style></head><body><div id="page"><div id="Skillet_Product_List_and_Price" class="menue"><?phpusing Google.GData.Client;using Google.GData.Spreadsheets;namespace MySpreadsheetIntegration{class Program{static void Main(string[] args){SpreadsheetsService service = new SpreadsheetsService("https://docs.google.com/a/emich.edu/spreadsheets/d/1OAFhMrayek9BKvO6ZI9EIPmCeY61oLL7-wfZOIg2xV8/edit#gid=724477237");// TODO: Authorize the service object for a specific user (see other sections)// Instantiate a SpreadsheetQuery object to retrieve spreadsheets.SpreadsheetQuery query = new SpreadsheetQuery();// Make a request to the API and get all spreadsheets.SpreadsheetFeed feed = service.Query(query);if (feed.Entries.Count == 0){// TODO: There were no spreadsheets, act accordingly.}// TODO: Choose a spreadsheet more intelligently based on your// app's needs.SpreadsheetEntry spreadsheet = (SpreadsheetEntry)feed.Entries[0];Console.WriteLine(spreadsheet.Title.Text);// Get the first worksheet of the first spreadsheet.// TODO: Choose a worksheet more intelligently based on your// app's needs.WorksheetFeed wsFeed = spreadsheet.Worksheets;WorksheetEntry worksheet = (WorksheetEntry)wsFeed.Entries[0];// Fetch the cell feed of the worksheet.CellQuery cellQuery = new CellQuery(worksheet.CellFeedLink);cellQuery.MinimumRow = 2;cellQuery.MinimumColumn = 1;cellQuery.MaximumColumn = 2;CellFeed cellFeed = service.Query(cellQuery);// Iterate through each cell, printing its value.foreach (CellEntry cell in cellFeed.Entries){// Print the cell's address in A1 notationConsole.WriteLine(cell.Title.Text);// Print the cell's address in R1C1 notationConsole.WriteLine(cell.Id.Uri.Content.Substring(cell.Id.Uri.Content.LastIndexOf("/") + 1));// Print the cell's formula or text valueConsole.WriteLine(cell.InputValue);// Print the cell's calculated value if the cell's value is numeric// Prints empty string if cell's value is not numericConsole.WriteLine(cell.NumericValue);// Print the cell's displayed value (useful if the cell has a formula)Console.WriteLine(cell.Value);}}}}?></div></div></body></html> But I've also tried this, which I was playing with : $file = "https://docs.google.com/a/emich.edu/spreadsheets/d/1OAFhMrayek9BKvO6ZI9EIPmCeY61oLL7-wfZOIg2xV8/edit#gid=724477237"$data = file_get_contents($file) or die('Could not read file!');echo $datafunction readRows() {var sheet = SpreadsheetApp.getActiveSheet(Eateries Menu Pricing.xlsx);var rows = sheet.getDataRange(A2:22);var numRows = rows.getNumRows(22);var values = rows.getValues();for (var i = 0; i <= numRows - 1; i++) {var row = values;Logger.log(row);}};var ss = SpreadsheetApp.getActiveSpreadsheet();var sheet = ss.getSheets()[0];// This represents ALL the datavar range = sheet.getDataRange();var values = range.getValues();//This logs the spreadsheet in CSV format with a trailing commafor (var i = 0; i < values.length; i++) {var row = "";for (var j = 0; j < values.length; j++) {if (values[j]) {row = row + values[j];}row = row + ",";}Logger.log(row);} And finally I've tried this just to try displaying a website thinking it'll work: <?php$myvar = "https://docs.google.com/a/emich.edu/spreadsheets/d/1O8-h-xmGE49K4x9sHrRL-c 97bHPXhma2eKkqrYAvog/edit#gid=1568863245";$var = fopen($myvar,"rb");echo stream_get_contents($var);?> DISCLAIMER: I understand that somewhat similar-ish questions have been asked before, but I am so new to PHP that I really need to be talked through this process. I've been looking everywhere online to try to understand this all, and I'm really trying to understand the process and how this all works
  • Create New...