Wikipedia Diskussion:Textverarbeitung/EXCEL-Tabellenumwandlung/VBA-Macro for EXCEL tableconversion

message: running a apple version of excel and this bug appeared, 
 Private Sub writecell(colnr As Long)
 oline = oline + 1: orange.Cells(oline, 1) = formatstring_for_a_cellcontent(False, colnr = 1) & " | " & _
                                            process_cellcontent(selrange.Cells(iline, icolumn))
 End Sub
there's a little yellow arrow in the margin, and hmmm???
--70.52.24.207 02:44, 23. Apr 2006 (CEST)
thread_title:  Tried to run macro in Apple Enviroment 

message: Hello, 
Thank you very much for your macro! I have however some problems with it:
In the manual you write: 
* In the left window you see the open VBA-Projects
* There you right-click on 'VBA-Project' with the cursor placed at the name of your actual dokument
I cannot see this, I just have an empty white page, divided in tow parts (main page above and a smaller division 'execution' below), but I continue: 
* In the contextmenü use Insert/Modul
* In the right window you will get a empty white area
There is no right window, but a new one opens
* Select the entire vba-Code above and insert it into that new modul
done
* Go back to your worksheet, do the final formatting of your table, then select the range you want to convert into a wiki-table
done
* Execute the macro format_as_wikitable
done! Now I have a nice table in the wiki, however without the cell borders. Is there any way to include these?
Just a remark: I get an error, if I select the range you want to convert into a 
wiki-table before inserting the macro:
"ineattribut_fondcolor = selrange.Cells(iline, 1).Font.Color"
It works only if I do not choose anything before starting to execute what you  describe. --ChristianeT 14:13, 8 June 2006 (EDT)
:*Hello Christiane, I did some changes to manual, hope they help clarifing. Keep in mind that EXCEL 1.) I do not work on english EXCEL, nor do I ~2.) have an english installation to prove all the details of the manual. Though that's not professional, I would neither be paid for such expenses or any work invested into this volunteering project. Anyway it seems you got the VBA-code to do its work. Congratulations.
::Concerning the borders: I don't embeed wiki-Code for individual borders on the cell level. I thougth about it, but dissmissed such plans. It would   e.g. blow up the volume of generated wikicode, besides the extra programming work :-) Anywhay there ist a -directive  on top of the table. This directive formattes a nice tableborder. You can see a sample table of mine at sample table. Of course that directive must be definied on your home wiki-project. What wiki-project are you native from? Maybe you should check if that prerequiste is meet there. Write here if you need furter assistance. kind regards, --ollio 22:21, 8. Jun 2006 (CEST)
thread_title:  Executing your manual for excel -> wiki 

message: I'm use the English Wikipedia and have uploaded and run your macro with success. Although the wiki version of the table does not include merged cells or center formating it does substantually reduce the size of the table.
I have edited the english text of the article to improve the English and will check back from time to time to see if there is anything else I can improve. Thanks for this macro. It will make it possible now for me to use tables on the Wikipedia all of the time. 209.216.92.232 17:06, 3. Jul 2006 (CEST)
thread_title:  English text: support in quality assurance 

message: ' create output worksheet
    removed:Worksheets.Add 'always added at first place (?)
    removed:Worksheets(1).Name = outtabName
    Call Utility.AddSheetIfNotExists("wikioutput")
    Worksheets("wikioutput").Select
Hi <unsigned autor>, for the discussion here I use the languages english or german, but not VBA. It would be nice if you comment your opignion and purpose instead of providing nonfunctional modifications of statements. Your code obviously calls a local class of your own environment and does not work for the public. I personally don't bother that much the position of the newly added tab. --ollio 22:19, 25. Jul 2006 (CEST)
thread_title:  dynamically creating wikioutput tab as last tab 

message: On a whim, I did a Google Search to see if anyone had come up with a way to convert tables from Excel to Wikitable.  Thanks so much for creating this, and I look forward to seeing it evolve.
I do have a challenge, however.  I wonder if it is possible to create a set of macros that would take copied wikitable source code, and drop the data onto an excel sheet.  I know that you can copy the html table source, but that's a lot of extra code that shouldn't be necessary.  I know it's possible to do it from XML source code as well. Anyway, thanks!  Chadlupkes 03:48, 30. Dez. 2006 (CET)
replies: text: Hi, no need for doing any coding here. Just select the table in the HTML-Window, copy it to the clipboard, paste it into EXCEL. You will get all content, formatting, coloring etc. If you have problems doing this, make sure that your really select the HTML-Tableheader and -tail. You can achieve this by selecting one more character outside from the outside of the table, both a the tablehead and tail . --ollio 21:55, 19. Jan. 2007 (CET)
thread_title:  Thank you and a challenge 

message: Thanks a lot for the great macro you provide to convert xls spreadsheets to mediawiki.
As it is written in the tool presentation, the result is made of individual cells : "Cell formatting: In EXCEL each cell can have its individual frame information on all four sides. This is not possble in wiki-table, where the framing is defined on a tablewide standard formatting."
You say it is not possible, but to my knowledge under Mediawiki you can use colspan and rowspan : so if  the xls cell is a merged cell would it be possible to have the same rendering in the output via colspan and rowspan ? Jean Cognard 12:02, 19. Jan. 2007 (CET)
replies: text: Hello, I agree that this might be possible. I will think about that, but to get coding it I've first to get in the mood of doing again such volontary coding work in this area. Right now I have other priorities, though in any case you have to be patient, sorry. --ollio 22:01, 19. Jan. 2007 (CET)
thread_title:  Wish-list for colspan and rowspan 

message: To start with: a very nice macro! Wonderful! It saves me a lot of time converting Excel-sheets with colors/bold etc into the right format!
One question though: Is it possible to add something in the code (I am not a whizzkid) that will insert a "nobreakspace" (& nbsp;) into an empty cell the macro will process?
For this moment if you have an empty cell it is not displayed properly as a real 'empty' cell in the wikitable. If you add a "nobreakspace" (& nbsp;) it shows at least a cell with nothing in it.
Thanks in advance!
<BR>
Bart -- 16:08, 15. Feb. 2007 194.237.142.21
:Thanks Bart for your valuable a precisely feedback. Please download and tryout V14, it should work the way you mean. Otherwise please report it here. :It's changed and tested. 
:It has been an pleasure,
:Othmar  ollio 23:20, 15. Feb. 2007 (CET)
replies: text: If you have this problem and your solution ok for you. In my test I tested "nbsp" in this wiki with a sample table and it worked. --ollio 22:47, 2. Mär. 2007 (CET)
replies: text: Take a look, the wiki page is not showing the "nbsp". Now somebody even edited the "nbsp" out of the source code. I wonder if this will not insert the bug back. --mw:User:Fernando.correia 15:45, 5. Mär. 2007 (CET)
replies: text:  Ok, first I have to say that I'm not happy with people messing up with the sourcecode. It's protected by a GNU-License. I'm even a little upset if someone does this, using a anonymous IP-Account, please don't do this. No to to subject:
=== Sample of correct table rendering ===
Below you see the table rendered with code cellcontent = " ". A simple whitespace is not displayed in a wikitable, it is simply absorbed.
It's the same effect if simply coded cellcontent = " ".
c	
 	
Below you see the table rendered with code cellcontent = " ". This changes the cellrendering though that parameter like cellheight are respected in the wiki rendering. This is the purpose of the V14 changes.
Test  	 
 	 
For convenience a added a binary variable to switch between these two possiblities. Please switch the this variable your local copy of the code. Please do not edit the sourcecode. I Hope this will cover both of the differgent wishes. 
--ollio 23:52, 5. Mär. 2007 (CET)
thread_title:  Adding a & nbsp; in empty cells 

message: Below you see the table rendered with code cellcontent = " ". A simple whitespace is not displayed in a wikitable, it is simply absorbed.
It's the same effect if simply coded cellcontent = " ".
c	
 	
Below you see the table rendered with code cellcontent = " ". This changes the cellrendering though that parameter like cellheight are respected in the wiki rendering. This is the purpose of the V14 changes.
Test  	 
 	 
For convenience a added a binary variable to switch between these two possiblities. Please switch the this variable your local copy of the code. Please do not edit the sourcecode. I Hope this will cover both of the differgent wishes. 
--ollio 23:52, 5. Mär. 2007 (CET)
thread_title:  Sample of correct table rendering 

message: The Macro needs to be updated with to replace  with class="wikitable" because  has been depreciated.
Great macro btw. 
Toastysoul - en.wikipedia.org
:: ok, see updated V15, Thanks for the hint ollio 23:59, 21. Apr. 2007 (CEST)
thread_title:  prettytable depreciated