Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste Excel with formatting #131

Open
henrik-forsell opened this issue Jul 3, 2024 · 8 comments
Open

Paste Excel with formatting #131

henrik-forsell opened this issue Jul 3, 2024 · 8 comments

Comments

@henrik-forsell
Copy link

At times I want to paste a table from Excel into markdown using this extention and Ctrl+Alt+C. The problem is that it creates a picture instead of a table. I can copy from Excel and into Word. Then copy the word table into markdown and it becomes a markdown table.

Is there a setting that I am missing? Or could it be a fix/option to paste as table from Excel?

@telesoho
Copy link
Owner

telesoho commented Jul 4, 2024

@henrik-forsell

Excel can only be used on Windows, and I don't have Excel, so I'm not sure what the content of the clipboard looks like after copying in Excel. Implementing this feature would be very difficult.

@henrik-forsell
Copy link
Author

That could of course be problematic! :)

There is another extension that does only one thing called "Excel to Markdown table". The development seem to have halted. That code could be used to understand what is sent to the clip board. Or maybe see if it is possible to merge that code into Markdown Paste. (With the other persons approval, of course!)

@telesoho
Copy link
Owner

@henrik-forsell
Thank you for providing the information. I will study their code and see if it can be integrated into this extension.

@telesoho
Copy link
Owner

@henrik-forsell

I has release a new version v1.1.0 to support pasting spreadsheet content. I tested the content from WPS spreadsheets, and it works fine, but I haven't tested it with Microsoft's Excel.
Additionally, I added a feature to parse clipboard content and convert it to Markdown format using a large language model(base on Groq). If you're interested, you can give it a try.

@henrik-forsell
Copy link
Author

henrik-forsell commented Aug 19, 2024

I have tested it with MS Excel data and it works perfectly! Thanks a lot!

When it comes to the Groq integration, I have not really understood what it does compared to the non AI version. But, I did see two details:

  • In the decription under Features you write "Enable this feature by Set MarkdownPaste.enableAI to ture." Should be "true".
  • In the settings for API key it says "Markdown Paste: Ai Key". Shouldn't this be "API key".

@telesoho
Copy link
Owner

@henrik-forsell

I have tested it with MS Excel data and it works perfectly! Thanks a lot!

When it comes to the Groq integration, I have not really understood what it does compared to the non AI version. But, I did see two details:

  • In the decription under Features you write "Enable this feature by Set MarkdownPaste.enableAI to ture." Should be "true".
  • In the settings for API key it says "Markdown Paste: Ai Key". Shouldn't this be "API key".

Thank you for pointing out the errors.

The AI mode is currently just an experiment, mainly aimed at leveraging large language models to extend the capabilities of this extension. For example, by setting appropriate prompts in aiSysMessage, the AI can automatically translate clipboard content and convert it into Markdown format.

@libukai
Copy link

libukai commented Sep 11, 2024

Hope to support the OpenAI-compatible interface, customize the baseurl

@telesoho
Copy link
Owner

@libukai

Hope to support the OpenAI-compatible interface, customize the baseurl

I have pre-released a new version, pre1.3.0, to support the OpenAI-compatible interface. Welcome to use it and provide any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants