Simple Sudoku > Excel

Programs which generate, solve, and analyze Sudoku puzzles

Simple Sudoku > Excel

Postby Neunmalneun » Fri Feb 24, 2006 12:17 pm

Is it possible to eport a Simple Sudoku grid (with pencil marks) into an excel-sheet? How do you have to proceed? (I tried "copy and paste", but the numbers did not appear properly in 81 cells.) Thanks in advance.
Neunmalneun
 
Posts: 52
Joined: 22 December 2005

Postby udosuk » Fri Feb 24, 2006 4:10 pm

This is possible but quite complicated. Are you sure you want to learn it?

Anyway here is the method. You need to use 4 different softwares: Simple Sudoku, Excel, Word and Notepad (you might use Word or Wordpad for the Notepad steps but I prefer it as it's more simple).

1. Copy & Paste the grid (with pencil marks) from Simple Sudoku to Notepad.

2. Keep only the last grid (with candidate lists) and delete the rest.

3. Delete the horizontal grid lines, so that only 9 lines are left.

4. Press Ctrl-H from the keyboard (or you can select "Replace" from the Edit menu).

5. In "Find what:" put in " | " (space-stroke-space), in "Replace what:" put in nothing. Then click "Replace All". This deletes all the instance of " | " in the text.

6. Do the same thing for "|" (stroke). This deletes all the strokes at the end of lines.

7. Do the same thing again, this time in "Find what:" put in " " (2 spaces), and in "Replace what:" put in " " (1 space). Now click "Replace All" and keep clicking it for several times until it finishes replacing all the multiple spaces in the text to single spaces.

8. Now press Ctrl-A (Select All) & copy & paste the whole text to Word.

9. In Word, press Ctrl-H (Replace) again. This time replace " " (space) with "^t" (tab character) and click "Replace All". (You can only do this in Word but not in Notepad!)

10. Ctrl-A (Select All) & copy & paste the whole thing back to Notepad.

11. Ctrl-A (Select All) & copy & paste the whole thing to Excel.

12. In Excel you might see some numbers automatically converted to exponential format. Just Ctrl-A (Select All) & in the menu click "Format -> Column -> Autofit Selection" and you should have all digits displayed now. Now do whatever formatting you want in the sheet.

You might perform the Notepad steps using Word, but I don't like to copy & paste things directly from Word to Excel as it brings over the fonts. Using Notepad as a middle relay keeps things simple (a matter of personal taste).

Anyway hope this is helpful!
udosuk
 
Posts: 2698
Joined: 17 July 2005

Postby tarek » Fri Feb 24, 2006 4:36 pm

How about using a MACRO to tabulate them into different cells after cut & paste.

I'm NOT an expert on this though

Tarek

[Edited: added an important word "NOT"]
Last edited by tarek on Fri Feb 24, 2006 12:50 pm, edited 1 time in total.
User avatar
tarek
 
Posts: 3762
Joined: 05 January 2006

Postby Neunmalneun » Fri Feb 24, 2006 4:46 pm

Thank you very much. Miraculously it worked in the end though I am definitively not an expert (neither for Simple Sudoku nor for Excel). Eventually I had to make some amendments in the Excel sheet since some of the keys and short cuts are a bit different on a German keyboard (I had to delete some Tabs) but now it works perfectly. By the way: Notepad was not necessary.
Neunmalneun
 
Posts: 52
Joined: 22 December 2005

Postby Shazbot » Fri Feb 24, 2006 10:45 pm

I have a spreadsheet that does exactly this. Grid is copied from Simple Sudoku, pasted into the spreadsheet and it gives you a second grid with the extra spacing removed. I did it up to help post grids onto this forum and minimise the wrapping problem. One of the "side effects" (one of the results on the way to the solution) IS a 9x9 grid with the candidates of each cell. There's VERY little mucking around, as all the work (detailed in the above posts) is done for you in formulas.

PM me your email address if you'd like a copy of this.
Shazbot
 
Posts: 220
Joined: 24 September 2005

Postby Pi » Sun Feb 26, 2006 1:24 pm

If anyone wants a spreadsheet that puts the candidates in for you just let me know
Pi
 
Posts: 389
Joined: 27 May 2005

re: from Simple Sudoku to Excel

Postby Pat » Sun Mar 19, 2006 5:49 pm

hi udosuk,

i've copied your above suggestions with somewhat fewer steps
- looks like this should work just as well,
what do you think?

~ Pat


You need to use Notepad
as an intermediary between Simple Sudoku and Excel:

  1. Copy the grid (with pencil marks) from Simple Sudoku;
    Paste into Notepad.
  2. Keep only the last grid (with candidate lists)
    - delete the rest.
  3. Delete the horizontal grid-lines,
    so that only 9 lines are left.
  4. To delete all instances of | -
    press Ctrl-H from the keyboard (or you can select Replace from the Edit menu);
    in Find what put in |,
    in Replace with put in nothing,
    then click Replace All.
  5. To reduce all multiple spaces to a single space -
    press Ctrl-H (Replace);
    in Find what put in two spaces,
    in Replace with put in one space,
    then click Replace All
    and keep clicking it for several times
    until it finishes replacing all the multiple spaces to single spaces
    .
    (This requires visual inspection to make sure all double-spacing is gone.)
  6. Use the Tab key to create a Tab character in Notepad,
    then Cut (Ctrl-X) this Tab character into the Clipboard.

    Press Ctrl-H (Replace);
    in Find what put in a space,
    in Replace with put in a Tab character (paste it from the Clipboard!)
    and click Replace All.
  7. Ctrl-A (Select All), Copy;
    go to Excel, Paste.
  8. In Excel you might see some numbers automatically converted to exponential format.
    Just Ctrl-A (Select All) & in the menu click Format -> Column -> Autofit Selection and you should have all digits displayed now.
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Postby udosuk » Mon Mar 20, 2006 9:06 am

Pat, you're absolutely right! Didn't know you could copy & paste the tab character to the replace window. Nice trick! Thanks for letting me learn that!
udosuk
 
Posts: 2698
Joined: 17 July 2005

Postby robert@fm » Wed Mar 22, 2006 10:48 pm

I read the thread title as "Simple Sudoku is better than Excel"!:D

I would have used "->" rather than ">"...
robert@fm
 
Posts: 28
Joined: 20 February 2006

Postby angusj » Wed Mar 22, 2006 11:36 pm

robert@fm wrote:I read the thread title as "Simple Sudoku is better than Excel"!:D

Well it is! (at least for solving Sudoku)
:D
angusj
 
Posts: 306
Joined: 12 June 2005

Postby udosuk » Fri Mar 24, 2006 2:29 pm

Simple Sudoku > Excel

=> Simple Sudoku is better than Excel (for solving sudoku)

=> angusj is better than Bill Gates?! (for ...):D
udosuk
 
Posts: 2698
Joined: 17 July 2005


Return to Software