tips:excel_macro
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tips:excel_macro [2014-09-30 16:20] – [File with Makro] 84.242.110.34 | tips:excel_macro [2023-02-19 18:15] (current) – [Download] GirHub URL changed ProfMobilux | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Excel macro for exporting a selected cell range to Dokuwiki ====== | ====== Excel macro for exporting a selected cell range to Dokuwiki ====== | ||
- | [[http:// | + | ===== File with Makro ===== |
Herewith a further version of this nice macro directly within the file. The tool contains parameters on first worksheet to \\ | Herewith a further version of this nice macro directly within the file. The tool contains parameters on first worksheet to \\ | ||
allow the user some customization. Paste your table into another worksheet, select the cells as usual and run the makro. | allow the user some customization. Paste your table into another worksheet, select the cells as usual and run the makro. | ||
+ | Also check this [[: | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | [[Y: | ||
==== Features/ | ==== Features/ | ||
- | ^ Configuration Parameter | + | ^ Configuration Parameter |
- | |text formatting| | + | | text formatting |
- | |horizontal Alignment| | + | | horizontal Alignment |
- | |Detect and use text color| | + | | Detect and use text color |
- | |Detect and use cell color| | + | | Detect and use cell color |
- | |Use first Line as Table Header| | + | | Use first Line as Table Header |
- | |Use first Column as Table Header| | + | | Use first Column as Table Header |
- | |Hyperlinks only as address| | + | | Hyperlinks only as address |
- | |turn comments into footnotes | yes/ | + | | turn comments into footnotes |
- | |defined table width| | + | | defined table width |
==== Download ==== | ==== Download ==== | ||
A German excel version is throwing errors caused by “**ThisWorkbook**.Sel2Wiki” due to a string is handed over and no function is used. \\ | A German excel version is throwing errors caused by “**ThisWorkbook**.Sel2Wiki” due to a string is handed over and no function is used. \\ | ||
Line 49: | Line 28: | ||
For downloading the file please visit following Forum post: \\ | For downloading the file please visit following Forum post: \\ | ||
[[http:// | [[http:// | ||
- | or from our git: [[https:// | + | or from our git: [[https:// |
+ | ==== Getting it working ==== | ||
For the clipboard code to work, you need at least Excel 2000. If you get an error message for DataObject, try adding an empty form to your project in the VBA editor. Alternatively, | For the clipboard code to work, you need at least Excel 2000. If you get an error message for DataObject, try adding an empty form to your project in the VBA editor. Alternatively, | ||
- | If you can't find the reference, go to the VB Editor, Insert Form and check again. If it's still not there, try the instructions here: http:// | + | If you can't find the reference, go to the VB Editor, Insert Form and check again. |
+ | |||
+ | If MSForms is not listed, and you can't find it in the References list, go | ||
+ | to add a reference and then hit the " | ||
+ | yourself. MSForms is in a file called " | ||
+ | other versions would be numbered accordingly) which is probably in your | ||
+ | Windows\System32 folder. You should be able to add it that way (even without | ||
+ | adding a UserForm). If you can't find the file, it may have somehow gotten | ||
+ | erased and you may need to reinstall Excel. (from http:// | ||
+ | |||
+ | If it's still not there, try the instructions here: http:// | ||
===== Complex Tables ===== | ===== Complex Tables ===== | ||
Line 396: | Line 386: | ||
myButton.Style = msoButtonCaption | myButton.Style = msoButtonCaption | ||
myButton.BeginGroup = True | myButton.BeginGroup = True | ||
- | myButton.OnAction = " | + | myButton.OnAction = " |
End Sub | End Sub | ||
Line 409: | Line 399: | ||
Dim rows As Integer, cols As Integer, thisRow As Integer, thisCol As Integer | Dim rows As Integer, cols As Integer, thisRow As Integer, thisCol As Integer | ||
Dim inMerge As Boolean | Dim inMerge As Boolean | ||
- | Dim oData As DataObject | + | Dim oData As Object |
- | Set oData = New DataObject | + | Set oData = CreateObject(" |
Set currentSelection = ActiveWindow.RangeSelection | Set currentSelection = ActiveWindow.RangeSelection | ||
rows = currentSelection.rows.Count | rows = currentSelection.rows.Count |
tips/excel_macro.1412086843.txt.gz · Last modified: 2014-09-30 16:20 by 84.242.110.34