Copy table in javascript

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Copies the contents of a table into the clipboard for pasting in Microsoft Excel.

License

ComFreek/js-copytable

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Ever wanted to directly copy a table on a website to a Microsoft Excel Worksheet? Just use js-copytable!

Читайте также:  Php mysql set charset utf8

Copying into Microsoft Exel

Embed these two files in your HTML document:

Then, create your button (with an optional, but recommend container) and your table:

And finally the actual script which initiates js-copytable:

window.onload = function () < copyTable.simpleInit(< button: document.getElementById("btn"), table: document.getElementById("tbl"), moviePath: "ZeroClipboard.swf", success: function (text) < alert("Successfully copied the table! The contents were:\n\n"+text); >, accessDenied: function () < alert("You have denied access in Internet Explorer!"); >>); >; 

Be sure to upload ZeroClipboard.swf to your server too! It’s a «fallback» for other browsers than IE.

Email: comfreek | outlook | com
Twitter: @ComFreek

  • js-copytable uses ZeroClipboard as a «fallback» for other browsers than IE which do not support clipboard access.

About

Copies the contents of a table into the clipboard for pasting in Microsoft Excel.

Источник

Оцените статью