DokuWiki

It's better when it's simple

User Tools

Site Tools


tips:excel_macro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tips:excel_macro [2014-09-30 16:54] – old revision restored (2013-12-21 12:27) 141.65.129.252tips:excel_macro [2023-02-19 18:15] (current) – [Download] GirHub URL changed ProfMobilux
Line 3: Line 3:
 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 [[:google_sheets_macro|Google Sheets Macro]] 
  
 ==== Features/Configuration ==== ==== Features/Configuration ====
-^ Configuration Parameter  ^  Options  ^ Effect in DokuWiki  | +^ Configuration Parameter           ^  Options  ^ Effect in DokuWiki                                                                                                    ^ 
-|text formatting|  yes/no  |defines if Bold, Italic, Undeline will be considered  +| text formatting                   |  yes/no   | defines if Bold, Italic, Undeline will be considered                                                                  
-|horizontal Alignment|  yes/no  |use same horizontal cell alignment \\ (left, center, right)  +| horizontal Alignment              |  yes/no   | use same horizontal cell alignment \\ (left, center, right)                                                           
-|Detect and use text color|  yes/no  |text will be colored as in Excel  +| Detect and use text color         |  yes/no   | text will be colored as in Excel                                                                                      
-|Detect and use cell color|  yes/no  |cell color will be used as text background color \\ (do not mixed up with cell color at the wiki)  +| Detect and use cell color         |  yes/no   | cell color will be used as text background color \\ (do not mixed up with cell color at the wiki)                     
-|Use first Line as Table Header|  yes/no  |colors the background first row light blue \\ (or whatever your template defined as header background color)  +| Use first Line as Table Header    |  yes/no   | colors the background first row light blue \\ (or whatever your template defined as header background color)          
-|Use first Column as Table Header|  yes/no  |colors the background first column light blue \\ (or whatever your template defined as header background color)   +| Use first Column as Table Header  |  yes/no   | colors the background first column light blue \\ (or whatever your template defined as header background color)       
-|Hyperlinks only as address|  yes/no  |display the hyperlink only by its real link address (no: use cell text as caption and put the link behind)  +| Hyperlinks only as address        |  yes/no   | display the hyperlink only by its real link address (no: use cell text as caption and put the link behind)            
-|turn comments into footnotes |  yes/no  |cell comments will be inserted as footnotes  +| turn comments into footnotes      |  yes/no   | cell comments will be inserted as footnotes                                                                           
-|defined table width|  yes/no  |table and columns will be defined in their width \\ (**Note:**_[[plugin:tablewidth|tablewidth]] plugin needed at DW)  |+| defined table width               |  yes/no   | table and columns will be defined in their width \\ (**Note:**_[[plugin:tablewidth|tablewidth]] plugin needed at DW)  |
 ==== 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 26: Line 28:
 For downloading the file please visit following Forum post: \\  For downloading the file please visit following Forum post: \\ 
 [[http://forum.dokuwiki.org/post/24915;nocount]] \\  [[http://forum.dokuwiki.org/post/24915;nocount]] \\ 
-or from our git: [[https://github.com/Taggic/Excel2DokuWiki/archives/master]]+or from our git: [[https://github.com/Taggic/Excel2DokuWiki]]
  
 +==== 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, add a reference to the MS Forms Library: Tools -> References -> Make sure Microsoft Forms 2.0 Object Library is checked. 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, add a reference to the MS Forms Library: Tools -> References -> Make sure Microsoft Forms 2.0 Object Library is checked.
  
-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://msdn.microsoft.com/en-us/library/aa159923%28office.11%29.aspx+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 "Browse..." button to look for the file 
 +yourself. MSForms is in a file called "FM20.dll" (at least for version 2.0; 
 +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://www.excelforum.com/excel-programming-vba-macros/353942-how-do-i-reference-dataobject.html) 
 + 
 +If it's still not there, try the instructions here: http://msdn.microsoft.com/en-us/library/aa159923%28office.11%29.aspx
  
 ===== Complex Tables ===== ===== Complex Tables =====
Line 373: Line 386:
     myButton.Style = msoButtonCaption     myButton.Style = msoButtonCaption
     myButton.BeginGroup = True     myButton.BeginGroup = True
-    myButton.OnAction = "ThisWorkbook.SelectionToWiki"+    myButton.OnAction = "ThisWorkbook.SelectionToWiki" '"DieseArbeitsmappe.SelectionToWiki" for german users.
    
 End Sub End Sub
Line 386: 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("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}") 'Instantiate DataObject without FM 2.0.
     Set currentSelection = ActiveWindow.RangeSelection     Set currentSelection = ActiveWindow.RangeSelection
     rows = currentSelection.rows.Count     rows = currentSelection.rows.Count
tips/excel_macro.1412088869.txt.gz · Last modified: 2014-09-30 16:54 by 141.65.129.252

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki