Package com.google.gdata.data.docs

Examples of com.google.gdata.data.docs.SpreadsheetEntry


    if (type.equals("document")) {
      newEntry = new DocumentEntry();
    } else if (type.equals("presentation")) {
      newEntry = new PresentationEntry();
    } else if (type.equals("spreadsheet")) {
      newEntry = new SpreadsheetEntry();
    } else if (type.equals("folder")) {
      newEntry = new FolderEntry();
    }

    newEntry.setTitle(new PlainTextConstruct(title));
View Full Code Here


       
        DocsService docsService = GDataExtension.getDocsService(token);
        final SpreadsheetService spreadsheetService = GDataExtension.getSpreadsheetService(token);
       
        try {
            SpreadsheetEntry spreadsheetEntry = new SpreadsheetEntry();
            spreadsheetEntry.setTitle(new PlainTextConstruct(name));
           
            final SpreadsheetEntry spreadsheetEntry2 = docsService.insert(
                new URL("https://docs.google.com/feeds/default/private/full/"), spreadsheetEntry);
           
            int[] size = CustomizableTabularExporterUtilities.countColumnsRows(
                    project, engine, params);
           
            URL worksheetFeedUrl = spreadsheetEntry2.getWorksheetFeedUrl();
            WorksheetEntry worksheetEntry = new WorksheetEntry(size[1], size[0]);
            worksheetEntry.setTitle(new PlainTextConstruct("Uploaded Data"));
           
            final WorksheetEntry worksheetEntry2 =
                spreadsheetService.insert(worksheetFeedUrl, worksheetEntry);
           
            spreadsheetEntry2.getDefaultWorksheet().delete();
           
            new Thread() {
                @Override
                public void run() {
                    spreadsheetService.setProtocolVersion(SpreadsheetService.Versions.V1);
                    try {
                        uploadToCellFeed(
                            project, engine, params,
                            spreadsheetService,
                            spreadsheetEntry2,
                            worksheetEntry2);
                    } catch (Exception e) {
                        logger.error("Error uploading data to Google Spreadsheets", e);
                    }
                }
            }.start();
           
            return spreadsheetEntry2.getDocumentLink().getHref();
        } catch (MalformedURLException e) {
            exceptions.add(e);
        } catch (IOException e) {
            exceptions.add(e);
        } catch (ServiceException e) {
View Full Code Here

    if (type.equals("document")) {
      newEntry = new DocumentEntry();
    } else if (type.equals("presentation")) {
      newEntry = new PresentationEntry();
    } else if (type.equals("spreadsheet")) {
      newEntry = new SpreadsheetEntry();
    } else if (type.equals("folder")) {
      newEntry = new FolderEntry();
    }

    newEntry.setTitle(new PlainTextConstruct(title));
View Full Code Here

    if (type.equals("document")) {
      newEntry = new DocumentEntry();
    } else if (type.equals("presentation")) {
      newEntry = new PresentationEntry();
    } else if (type.equals("spreadsheet")) {
      newEntry = new SpreadsheetEntry();
    } else if (type.equals("folder")) {
      newEntry = new FolderEntry();
    }

    newEntry.setTitle(new PlainTextConstruct(title));
View Full Code Here

TOP

Related Classes of com.google.gdata.data.docs.SpreadsheetEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.