Giter VIP home page Giter VIP logo

ganesshkumar / obsidian-excel-to-markdown-table Goto Github PK

View Code? Open in Web Editor NEW
196.0 7.0 7.0 37 KB

An Obsidian plugin to paste data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables in Obsidian editor.

License: MIT License

JavaScript 15.77% TypeScript 84.21% CSS 0.02%
obsidian obsidian-md obsidian-plugin excel microsoft-excel libreoffice-calc apple-numbers google-sheets markdown plugin

obsidian-excel-to-markdown-table's Introduction

Obsidian Excel to Markdown Table

Excel to Markdown Banner

Tag 0.2.2 MIT License Maintainability Code Issues Tech Debt

An Obsidian plugin to paste data from Microsoft Excel, Google Sheets, Apple Numbers and LibreOffice Calc as Markdown tables in Obsidian editor.

Demo

You can paste the copied data in the clipboard by one of the following methods.

# Name Method Notes
1 Pasting Ctrl/Cmd + V will paste only table with two or more columns
2 Hotkey Crtl/Cmd + Alt + V will paste table with one column as well
reassign the Hotkey from settings if needed
3 Command Palette Ctrl/Cmd + P > Excel to Markdown will paste table with one column as well

Obsidian Excel to Markdown Table

Installation

From Obsidian

  1. Open Settings > Third-party plugin
  2. Make sure Safe mode is off
  3. Click Browse community plugins
  4. Search for this plugin
  5. Click Install
  6. Once installed, enable this plugin and close the community plugins window and the plugin is ready to use.

From GitHub

  1. Download the Latest Release from the Releases section of the GitHub Repository
  2. Put files to your vault's plugins folder: <vault>/.obsidian/plugins/obsidian-excel-to-markdown-table
  3. Reload Obsidian
  4. If prompted about Safe Mode, you can disable safe mode and enable the plugin.
    Otherwise, head to Settings, third-party plugins, make sure safe mode is off and enable the plugin from there.

Note: The .obsidian folder may be hidden. On macOS, you should be able to press Command+Shift+Dot to show the folder in Finder.

License

MIT

Acknowledgements


If you like my work, you could consider buying me a coffee. It is unnecessary, but appreciated 🙂

Buy Me A Coffee

obsidian-excel-to-markdown-table's People

Contributors

ganesshkumar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

obsidian-excel-to-markdown-table's Issues

[BUG] Prompt: Fail to load, on IOS

Describe the bug
Plugin Can't load properly on IOS, and prompt: Fail to load xxx, when start Obsidian.

To Reproduce
Steps to reproduce the behavior:

  1. install plugin on IOS
  2. enable plugin
  3. See error: Fail to load xxx

Expected behavior
Load successfully without warning.

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows
  • Version v1.0.0

Smartphone (please complete the following information):

  • Device: iPhone12
  • OS: iOS16.0.2
  • Version v1.4.0

[Feature Request]

Hope to combine with the Table Extended plug-in to support pasting of tables across rows and columns.

[Feature Request] Detect if the content being pasted into Obsidian, and then convert it into a table. An option to do this instead of pasting with a command.

Right now, I have to use the "Excel to Markdown" command to paste a table in markdown only, I'd like if I could just press CTRL V to paste it in. I can't just assign the shortcut to the command because then it would process all things I paste in. Ideally, the plugin could detect if a table would be paste and if so, then convert it to markdown.

[Bug Report] Bypass plugin

Is your feature request related to a problem? Please describe.
I need to be able to paste some text verbatim that happens to contain tabs. Unfortunately, this plugin assumes that this is a table.

Describe the solution you'd like
A way to paste as if obsidian-excel-to-markdown-table were disabled

Describe alternatives you've considered
I've tried to "type" text using BetterTouchTool.
I've tried option+shift+cmd to paste without formatting.
Neither worked.

Pasting table doesn't work if the R1 and C1 is empty

Describe the bug
If you try to copy a table in excel, and R1 and C1 of the table is empty, the plugin doesn't paste the table formatted as a table.

To Reproduce
Steps to reproduce the behaviour:

  1. create a table with => 2 Rows and 2=> Columns in Excel
  2. leave R1 C1 empty
  3. Copy
  4. paste in obsidian.

current workaround

  1. Fill R1 C1 with any char
  2. copy and paste
  3. delete R1 C1 later on in obsidian

Expected behaviour
Even if R1 C1 is empty, the table should be formatted correctly since markdown tables supports R1 C1 being empty

Desktop (please complete the following information):

  • OS: MacOS 13.2.1
  • Version Obsidian V1.1.9

[BUG] Pipe characters in excel cells are not escaped when pasted into Obsidian.

Describe the bug
Pipe | characters in excel cells are not escaped when pasted into Obsidian.

To Reproduce
Steps to reproduce the behavior:

  1. Create table in excel and enter a pipe | character somewhere inside the cell
    image
  2. Copy and paste the table into Obsidian
  3. Source code looks like
| Column 1        | Column2 |
|-----------------|---------|
| Value1a|Value1b | Value2  |

Expected behavior
The pipe character should be escaped.

| Column 1         | Column2 |
|------------------|---------|
| Value1a\|Value1b | Value2  |

Desktop (please complete the following information):

  • OS: Windows
  • Version 10

Additional context
According to https://www.markdownguide.org/extended-syntax/#escaping-pipe-characters-in-tables

You can display a pipe (|) character in a table by using its HTML character code (&#124;).

But it also doesn't specifically say you should not use the \ escape character which is a valid escape code and using \| does seem to render the table correctly which would be my preferred method as it's easier to remember. Perhaps this should be a configurable user option in case other users have a different preference.

[Feature Request] Paste cells with hyperlinks from Excel

**Is your feature request related to a problem? Please describe. **
When I copy and copy a row of cells which have hyperlinks but also a "friendly name" as Microsoft calls it ("link text") and paste it in Obsidian, it automatically creates a link in the desired form: [link text](https://example.com).

When I paste the table using your plugin, it only pastes the plain text and loses the hyperlink.

Describe the solution you'd like
It would be nice to have an option to paste tables from Excel to Obsidian and keep the hyperlinks.

This online converter does this exactly like described: https://tabletomarkdown.com/convert-spreadsheet-to-markdown/

Ctrl Z doesn't undo

It's a simple issue. Let's say I click add a new row inside the editor, then Ctrl Z won't remove the added row

Still awaiting Obsidian proper LP rendering

This is a great plug-in and am very eager to use it, but ……… Obsidian does not render tables in Live Preview as in Reading mode à la Typora. I am using Typora only for notes with tables because the rendering is fantastic.

Unfortunately, as WhiteNoise stated 4 weeks ago, it won't happen in the short term.

Marking entries as bold [Feature Request]

Is your feature request related to a problem? Please describe.
I often mark entries in bold in google sheet to show sub headings, and make the lines stand out. So when I copy the table from google sheet to markdown using the plugin, only the first line is in bold. Rest of the bold entries are lost and I have to resort to adding the double stars manually. As the sheet keeps changing over time, this becomes a repetitive process.

Describe the solution you'd like
When I copy the table from google sheet to obsidian. I would like the entries in bold (google sheet entries) to be marked in bold in markdown as well.

Describe alternatives you've considered
The alternative is to do it manually and that is tedious.

[BUG] Fails to paste table with blank cells in header row

Thank-you for creating this plugin!

Describe the bug
The plugin fails to insert excel tables which have blank cells. I have manage to work around this by putting spaces into my excel table which are supposed to be blank.
Granted, this is not legitimate markdown, as header rows cannot be blank.
The real problem is that there is no warning of the failure to paste, so I was left wondering whether the plugin was working or not for 30 mins.
Perhaps empty cells could be replaced with a space?

To Reproduce
Try and paste the following table where cell A1 is completely empty.
image

Plugin version:
version 0.4.0

[BUG]

Describe the bug
This plugin gives an error and fails to load on Obsidian for iOS

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [iPhone13]
  • OS: [iOS 15.3.1]
  • Version [Obsidian 1.1.0 (38), Plugin 0.2.2]

Empty cells of last row dont get pasted

Describe the bug
When i copy a Table, no matter the size, if the last row only has the first left cell filled, the empty cells wont get pasted correctly.

To Reproduce

  1. Copy a, f.e., 3*3 table, while the last row contains empty cells besides the first (the left) one.
  2. CMD + C
  3. CMD + V in obsidian

Expected behavior
The last row should be pasted no matter what.

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS Ventura 13.2.1
  • Version Obsidian V1.1.9

Additional context
Empty cells get pasted correctly if anything BESIDES the last-left cell is filled.

[BUG] - Can't paste tables with merged cells or tables with multiple lines in the row

Describe the bug
Unable to paste if merged cells exist

To Reproduce
Steps to reproduce the behavior:

  1. Copy a table that has merged cells
  2. Paste it into obsidian with CTRL + ALT + V
  3. Table breaks nothing in the right spot

Expected behavior
Handle tables with merged cells

Screenshots
image

image

Desktop (please complete the following information):

  • OS: Manjaro
  • Version 23.1.3

Additional context
Nothing I can think of.

Pasting table is rendered in center

When I copy this table:

image

it is copied like this:

image

I want it to be put on the left, vertically below the R of “Results”.
How can I achieve that?

[BUG] If multiple line exists in one cell, this plugin parses quirkly.

Describe the bug

If multiple line exists in one cell, this plugin parses quirkly and generate wrong table.

# Name Method Notes
1 Pasting Ctrl/Cmd + V will paste only table with two or more columns
2 Hotkey Crtl/Cmd + Alt + V will paste table with one column as well
reassign the Hotkey from settings if needed
3 Command Palette Ctrl/Cmd + P > Excel to Markdown will paste table with one column as well

To Reproduce

Steps to reproduce the behavior:

Tyy copy & pasting table from https://github.com/ganesshkumar/obsidian-excel-to-markdown-table#demo into obsidian.

Expected behavior

A clear and concise description of what you expected to happen.

# Name Method Notes
1 Pasting Ctrl/Cmd + V will paste only table with two or more columns
2 Hotkey Crtl/Cmd + Alt + V will paste table with one column as well
reassign the Hotkey from settings if needed
3 Command Palette Ctrl/Cmd + P > Excel to Markdown will paste table with one column as well

Desktop:

  • OS: Windows 10
  • Version: 10.0.19044 build 19044

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.