Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

186
Vistas
Google Sheets To Docs

I want to copy all tables exactly like in google sheets,

I tried this script but the table is not the same, does anyone know if the table is exactly the same?

function table() {
  var ss = Sheets.Spreadsheets.Values.get("assassa", String("Sheet1!A1:Z")).values;
  var doc = DocumentApp.openById("asas"); // Or find one by name/ID
  var body = doc.getBody();
 
  var date = new Date();
  var time = date.toLocaleString("id", {
    "day": "2-digit",
    "month": "long",
    "year": "numeric",
    "minute": "2-digit",
    "timeZoneName": "short",
    "minute": "2-digit",
    "second": "2-digit",
    "hour": "2-digit",
  })
  var dataYouWant = ss;// stores a 2D array with the values
  body.clear();
  body.insertParagraph(0, `Data update: ${time}`).setHeading(DocumentApp.ParagraphHeading.HEADING1);
  table = body.appendTable(dataYouWant); // pastes table in doc

  table.getRow(0).editAsText().setBold(true);
}

edit:

enter image description here

From the photo above, the google sheet row F1:G1 data is fused, while in google docs it is not

Link: Google Sheet: https://docs.google.com/spreadsheets/d/1aof6Nt9kadhkIGlNHGmU9sH-j8Q6fOQzgcedD3tjlkk/edit?usp=sharing

Google Docs: https://docs.google.com/document/d/18i8rsuwMkmIPnLUTmRsEBGhye7MQG2Ypn25OcCElZ1Q/edit?usp=sharing

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda