Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

226
Visualizações
Is there a way to get the number of slides of a PowerPoint file without decompressing it or without using the Office.js API?

I need a way to find the number of slides in a PowerPoint presentation, using plain Javascript. After googling quite a lot, i've found out two methods, that don't seem to be so practical. The first one is using the Office.js api,but it only works within an Office client and i want it to work in the Browser. The code to get it done is the following, but as i said it doesn't work in the Browser:

PowerPoint.run(async (context) => {
    context.presentation.load("demo");
    await context.sync();

    var slides = context.presentation.slides;
    var slideCount = slides.getCount();
    await context.sync();

    console.log("There are ", slideCount.value, " slides in this presentation");
})

The second method is to decompress the PowerPoint file and get a bunch of xml files. One in particular called 'app.xml' is going to have a <Slides> field which contains the number of slides in the original ppt file.

I found it at the following link: How to get number of slides from uploaded ppt file using Nodejs?.

The problem is that I need to find the number of slides Client side and the method proposed in the link above, could work only Server side, because we need the filesystem to find the 'app.xml' file and get the <Slides> property. So how can i solve this problem?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda