title: R Script pdf to excel using pdftools
body: <p>I am using pdftools to convert the pdf to excel. I want to extract the table values.The code below works perfectly but it pastes everything in rows(I mean the values are not separated in different coloumns- The only thing I want is the table as it is in the pdf(the data and values). . Can someone help with the code? Maybe we need a separator? I hope for some help!
  3 images below:-
  Excel output I get,Expected Excel Output and the PDF I am working with.</p>
  
  <pre><code>library(pdftools)
  tx&lt;-pdf_text("Path")
  tx2&lt;-strsplit(tx,"\n")
  library(xlsx)
  write.xlsx(tx2,file="ds.xlsx")
  </code></pre>