Forum

Author Topic: Is it possible to generate excel file on Metashape?  (Read 1427 times)

dwieka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Is it possible to generate excel file on Metashape?
« on: March 21, 2022, 06:56:43 AM »
Hello! I need to generate an excel file in Metashape, I am already tried with some excel python libraries like openpyxl, xlutils, xlwt, etc, but it seems like not installed on Metashape Pythons environment. Is it possible to generate excel file in Metashape using python? Because I need a multiple sheet on my last output and CSV cannot handle it. Thank you  :D

dwieka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #1 on: March 21, 2022, 07:02:36 AM »
Is it impossible for me to use builtin library on Metashape python, is it possible for me to download library from Metashape's console? Like pip install something?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14765
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #2 on: March 21, 2022, 12:49:47 PM »
Best regards,
Alexey Pasumansky,
Agisoft LLC

dwieka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #3 on: March 21, 2022, 01:06:07 PM »
Thank you for your response, Alexey!  ;D
I've tried many times to install external module to metashape but only xlsxwriter works, this is the error of openpyxl module, any insight about this?
Images below are from my cmd and my Agisoft Metashape. Thank you

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14765
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #4 on: March 21, 2022, 01:33:29 PM »
Hello dwieka,

Which version of Metashape Pro you are using and which OS version?

I have just tried it with Metashape Pro 1.8.2 (on Windows 7 machine) and everything worked as expected.
« Last Edit: March 21, 2022, 01:40:12 PM by Alexey Pasumansky »
Best regards,
Alexey Pasumansky,
Agisoft LLC

dwieka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #5 on: March 22, 2022, 07:58:25 AM »
Thank you for your response, Alexey!
Ah okay, maybe I am currently using older version and it's already handled by xlsxwriter, anyway, is it possible to me to install external module from Metashape's console?
Thank you  ;)

lyhour

  • Newbie
  • *
  • Posts: 41
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #6 on: March 22, 2022, 11:16:37 AM »
Dear dwieka,

For install the external library or module to use in the Metashape, it can be use with this link https://agisoft.freshdesk.com/support/solutions/articles/31000136860-how-to-install-external-python-module-to-metashape-professional-package as the comment above. But it should be careful with the environment path that exists in your pc. For my experience, my python path or other path is conflict. I try to remove some environment path that unnecessary , then It worked.

dwieka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #7 on: March 22, 2022, 11:23:27 AM »
Dear lyhour,
Thank you for your response!
I've tried that before and work nicely, if you want to reduce path directory you can jump into python file on Metashape instalation then reduce the command from "%programfiles%....." to "%python.exe%" -m pip install something.
So.. my conclusion is impossible for us to install external module from Metashape's console right? If it possible we can add our python script with pip install before we run the script, but its not gonna work..
Thank you  :)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14765
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #8 on: March 22, 2022, 12:55:03 PM »
So.. my conclusion is impossible for us to install external module from Metashape's console right? If it possible we can add our python script with pip install before we run the script, but its not gonna work..

Hello dwieka,

If you have external module installed to Metashape Python according to the instruction mentioned above, you will be able to import that module to the script started from Metashape GUI or from the command line, as well as to import the module in Metashape Console pane or in the interactive console (when Metashape is started with -i command line argument).

Installation of the module from the script is not possible, unless you call pip install command via os module (or similar) and then call another script that relies on the newly installed module.
Best regards,
Alexey Pasumansky,
Agisoft LLC

dwieka

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Is it possible to generate excel file on Metashape?
« Reply #9 on: March 22, 2022, 01:03:33 PM »
Thank you for your response, Alexey!
Okay, very clear explanation about this, thank you for your help Alexey and lyhour ;)