chiswickbridge
Board Regular
- Joined
- Feb 2, 2013
- Messages
- 130
I play online Chess games with various opponents.....On completion.....these games are saved on the Website's page.... So after accessing the source code, I can get the text code of the game that I played in the following format....
Every move starts with a left curly bracket and ends with a right curly bracket..... Every game can have several lines of these moves.....
What I need is to save these games in Excel Workbook, on separate sheets for future analysis.
My workbook is named "Chess_games" and save on my D Drive with the following path....D:\Games\Chess-games.xlsm
Here is how I will start....On completion of every game......I will copy the source code to a Notepad file named "Chess".....and save in the same above folder.......Number of lines will vary with every game... but will surely start and end with the Curly brackets.....
I need a VBA to import the data into a new sheet called "Import" and data import begins from A1....I have listed 2 moves for the data to be imported.......
Move / timeusage / timeUsageClient / fen / knotid / Children
c2c4 / 7067 / 7098 / rnbqkbnr\/pppppppp\/8\/8\/2P5\/8\/PP1PPPPP\/RNBQKBNR b HAha - 0 1 / 1 / [2]
e7e5 / 6553 / 6055 / rnbqkbnr\/pppp1ppp\/8\/4p3\/2P5\/8\/PP1PPPPP\/RNBQKBNR w HAha - 0 2 / 2 / [3]
As soon as the data is imported..... The VBA can rename the sheets......and so will have all my games saved....
I little extra help....
My workbook will have the First sheet as MENU, 2nd sheet as IMPORT, 3rd and subsequent sheets may be named by the VBA.... Commencing from Game 1 to Game 999...
Hope I am clear and Thanks for your help...
{"move":"c2c4","timeUsage":7067,"timeUsageClient":7098,"fen":"rnbqkbnr\/pppppppp\/8\/8\/2P5\/8\/PP1PPPPP\/RNBQKBNR b HAha - 0 1","knotId":1,"children":[2]},{"move":"e7e5","timeUsage":6553,"timeUsageClient":6055,"fen":"rnbqkbnr\/pppp1ppp\/8\/4p3\/2P5\/8\/PP1PPPPP\/RNBQKBNR w HAha - 0 2","knotId":2,"children":[3]},{"move":"b1c3","timeUsage":2461,"timeUsageClient":2227,"fen":"rnbqkbnr\/pppp1ppp\/8\/4p3\/2P5\/2N5\/PP1PPPPP\/R1BQKBNR b HAha - 1 2","knotId":3,"children":[4]},{"move":"b8c6","timeUsage":18570,"timeUsageClient":18415,"fen":"r1bqkbnr\/pppp1ppp\/2n5\/4p3\/2P5\/2N5\/PP1PPPPP\/R1BQKBNR w HAha - 2 3","knotId":4,"children":[5]},{"move":"g2g3","timeUsage":7298,"timeUsageClient":7077,"fen":"r1bqkbnr\/pppp1ppp\/2n5\/4p3\/2P5\/2N3P1\/PP1PPP1P\/R1BQKBNR b HAha - 0 3","knotId":5,"children":[6]},{"move":"g8f6","timeUsage":15190,"timeUsageClient":15037,"fen":"r1bqkb1r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2N3P1\/PP1PPP1P\/R1BQKBNR w HAha - 1 4","knotId":6,"children":[7]},{"move":"f1g2","timeUsage":7002,"timeUsageClient":6752,"fen":"r1bqkb1r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2N3P1\/PP1PPPBP\/R1BQK1NR b HAha - 2 4","knotId":7,"children":[8]},{"move":"f8b4","timeUsage":15775,"timeUsageClient":15625,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/1bP5\/2N3P1\/PP1PPPBP\/R1BQK1NR w HAha - 3 5","knotId":8,"children":[9]},{"move":"e2e3","timeUsage":55497,"timeUsageClient":55265,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/1bP5\/2N1P1P1\/PP1P1PBP\/R1BQK1NR b HAha - 0 5","knotId":9,"children":[10]},{"move":"b4c3","timeUsage":15538,"timeUsageClient":15385,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2b1P1P1\/PP1P1PBP\/R1BQK1NR w HAha - 0 6","knotId":10,"children":[11]},{"move":"b2c3","timeUsage":3641,"timeUsageClient":3420,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2P1P1P1\/P2P1PBP\/R1BQK1NR b HAha - 0 6","knotId":11,"children":[12]},{"move":"d7d6","timeUsage":16295,"timeUsageClient":16131,"fen":"r1bqk2r\/ppp2ppp\/2np1n2\/4p3\/2P5\/2P1P1P1\/P2P1PBP\/R1BQK1NR w HAha - 0 7","knotId":12,"children":[13]},{"move":"d2d4","timeUsage":23901,"timeUsageClient":23678,"fen":"r1bqk2r\/ppp2ppp\/2np1n2\/4p3\/2PP4\/2P1P1P1\/P4PBP\/R1BQK1NR b HAha - 0 7","knotId":13,"children":[14]},{"move":"c8f5","timeUsage":18336,"timeUsageClient":18178,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/4pb2\/2PP4\/2P1P1P1\/P4PBP\/R1BQK1NR w HAha - 1 8","knotId":14,"children":[15]},{"move":"g1f3","timeUsage":38407,"timeUsageClient":38154,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/4pb2\/2PP4\/2P1PNP1\/P4PBP\/R1BQK2R b HAha - 2 8","knotId":15,"children":[16]},{"move":"f5e4","timeUsage":20468,"timeUsageClient":20312,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/4p3\/2PPb3\/2P1PNP1\/P4PBP\/R1BQK2R w HAha - 3 9","knotId":16,"children":[17]},{"move":"d4d5","timeUsage":13291,"timeUsageClient":13035,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/3Pp3\/2P1b3\/2P1PNP1\/P4PBP\/R1BQK2R b HAha - 0 9","knotId":17,"children":[18]},{"move":"c6a5","timeUsage":23720,"timeUsageClient":23572,"fen":"r2qk2r\/ppp2ppp\/3p1n2\/n2Pp3\/2P1b3\/2P1PNP1\/P4PBP\/R1BQK2R w HAha - 1 10","knotId":18,"children":[19]},{"move":"d1a4","timeUsage":10187,"timeUsageClient":9933,"fen":"r2qk2r\/ppp2ppp\/3p1n2\/n2Pp3\/Q1P1b3\/2P1PNP1\/P4PBP\/R1B1K2R b HAha - 2 10","knotId":19,"children":[20]},
Thanks in Advance.....
Every move starts with a left curly bracket and ends with a right curly bracket..... Every game can have several lines of these moves.....
What I need is to save these games in Excel Workbook, on separate sheets for future analysis.
My workbook is named "Chess_games" and save on my D Drive with the following path....D:\Games\Chess-games.xlsm
Here is how I will start....On completion of every game......I will copy the source code to a Notepad file named "Chess".....and save in the same above folder.......Number of lines will vary with every game... but will surely start and end with the Curly brackets.....
I need a VBA to import the data into a new sheet called "Import" and data import begins from A1....I have listed 2 moves for the data to be imported.......
Move / timeusage / timeUsageClient / fen / knotid / Children
c2c4 / 7067 / 7098 / rnbqkbnr\/pppppppp\/8\/8\/2P5\/8\/PP1PPPPP\/RNBQKBNR b HAha - 0 1 / 1 / [2]
e7e5 / 6553 / 6055 / rnbqkbnr\/pppp1ppp\/8\/4p3\/2P5\/8\/PP1PPPPP\/RNBQKBNR w HAha - 0 2 / 2 / [3]
As soon as the data is imported..... The VBA can rename the sheets......and so will have all my games saved....
I little extra help....
My workbook will have the First sheet as MENU, 2nd sheet as IMPORT, 3rd and subsequent sheets may be named by the VBA.... Commencing from Game 1 to Game 999...
Hope I am clear and Thanks for your help...
{"move":"c2c4","timeUsage":7067,"timeUsageClient":7098,"fen":"rnbqkbnr\/pppppppp\/8\/8\/2P5\/8\/PP1PPPPP\/RNBQKBNR b HAha - 0 1","knotId":1,"children":[2]},{"move":"e7e5","timeUsage":6553,"timeUsageClient":6055,"fen":"rnbqkbnr\/pppp1ppp\/8\/4p3\/2P5\/8\/PP1PPPPP\/RNBQKBNR w HAha - 0 2","knotId":2,"children":[3]},{"move":"b1c3","timeUsage":2461,"timeUsageClient":2227,"fen":"rnbqkbnr\/pppp1ppp\/8\/4p3\/2P5\/2N5\/PP1PPPPP\/R1BQKBNR b HAha - 1 2","knotId":3,"children":[4]},{"move":"b8c6","timeUsage":18570,"timeUsageClient":18415,"fen":"r1bqkbnr\/pppp1ppp\/2n5\/4p3\/2P5\/2N5\/PP1PPPPP\/R1BQKBNR w HAha - 2 3","knotId":4,"children":[5]},{"move":"g2g3","timeUsage":7298,"timeUsageClient":7077,"fen":"r1bqkbnr\/pppp1ppp\/2n5\/4p3\/2P5\/2N3P1\/PP1PPP1P\/R1BQKBNR b HAha - 0 3","knotId":5,"children":[6]},{"move":"g8f6","timeUsage":15190,"timeUsageClient":15037,"fen":"r1bqkb1r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2N3P1\/PP1PPP1P\/R1BQKBNR w HAha - 1 4","knotId":6,"children":[7]},{"move":"f1g2","timeUsage":7002,"timeUsageClient":6752,"fen":"r1bqkb1r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2N3P1\/PP1PPPBP\/R1BQK1NR b HAha - 2 4","knotId":7,"children":[8]},{"move":"f8b4","timeUsage":15775,"timeUsageClient":15625,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/1bP5\/2N3P1\/PP1PPPBP\/R1BQK1NR w HAha - 3 5","knotId":8,"children":[9]},{"move":"e2e3","timeUsage":55497,"timeUsageClient":55265,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/1bP5\/2N1P1P1\/PP1P1PBP\/R1BQK1NR b HAha - 0 5","knotId":9,"children":[10]},{"move":"b4c3","timeUsage":15538,"timeUsageClient":15385,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2b1P1P1\/PP1P1PBP\/R1BQK1NR w HAha - 0 6","knotId":10,"children":[11]},{"move":"b2c3","timeUsage":3641,"timeUsageClient":3420,"fen":"r1bqk2r\/pppp1ppp\/2n2n2\/4p3\/2P5\/2P1P1P1\/P2P1PBP\/R1BQK1NR b HAha - 0 6","knotId":11,"children":[12]},{"move":"d7d6","timeUsage":16295,"timeUsageClient":16131,"fen":"r1bqk2r\/ppp2ppp\/2np1n2\/4p3\/2P5\/2P1P1P1\/P2P1PBP\/R1BQK1NR w HAha - 0 7","knotId":12,"children":[13]},{"move":"d2d4","timeUsage":23901,"timeUsageClient":23678,"fen":"r1bqk2r\/ppp2ppp\/2np1n2\/4p3\/2PP4\/2P1P1P1\/P4PBP\/R1BQK1NR b HAha - 0 7","knotId":13,"children":[14]},{"move":"c8f5","timeUsage":18336,"timeUsageClient":18178,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/4pb2\/2PP4\/2P1P1P1\/P4PBP\/R1BQK1NR w HAha - 1 8","knotId":14,"children":[15]},{"move":"g1f3","timeUsage":38407,"timeUsageClient":38154,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/4pb2\/2PP4\/2P1PNP1\/P4PBP\/R1BQK2R b HAha - 2 8","knotId":15,"children":[16]},{"move":"f5e4","timeUsage":20468,"timeUsageClient":20312,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/4p3\/2PPb3\/2P1PNP1\/P4PBP\/R1BQK2R w HAha - 3 9","knotId":16,"children":[17]},{"move":"d4d5","timeUsage":13291,"timeUsageClient":13035,"fen":"r2qk2r\/ppp2ppp\/2np1n2\/3Pp3\/2P1b3\/2P1PNP1\/P4PBP\/R1BQK2R b HAha - 0 9","knotId":17,"children":[18]},{"move":"c6a5","timeUsage":23720,"timeUsageClient":23572,"fen":"r2qk2r\/ppp2ppp\/3p1n2\/n2Pp3\/2P1b3\/2P1PNP1\/P4PBP\/R1BQK2R w HAha - 1 10","knotId":18,"children":[19]},{"move":"d1a4","timeUsage":10187,"timeUsageClient":9933,"fen":"r2qk2r\/ppp2ppp\/3p1n2\/n2Pp3\/Q1P1b3\/2P1PNP1\/P4PBP\/R1B1K2R b HAha - 2 10","knotId":19,"children":[20]},
Thanks in Advance.....