Forum Discussion
Issue with comments/threaded comments/notes
- Oct 31, 2023
Seabottom If you can somehow copy the Finances tab from the old to the new file, then this script will paste everything from the "old" Finances (2) tab to the new Finances tab:
function main(workbook: ExcelScript.Workbook) { // Your code here let srcRng = workbook.getWorksheet("Finances (2)").getRange("A1:I168"); let tgtRng = workbook.getWorksheet("Finances").getRange("A1:I168"); tgtRng.copyFrom(srcRng,ExcelScript.RangeCopyType.all) }
But the only way I was able to open the "Old" file was by using desktop Excel. Then it offered to do some repairs. After that I copied the sheet to the other file you attached an I copied the comments using the script above.
I can't check whether the comments are intact. See attached.
- Open both files in desktop Excel
- Copy the sheet from the original file to the "new" file
- Open the new file in Excel on-line
- Copy the comments from the "old" sheet to the "new" sheet
- SeabottomOct 30, 2023Copper Contributor
JKPieterse excel online does not support copying of comments, that was the first thing I tried. I can make the new file and open online no problem, but Ctrl+alt+v does nothing and half the ribbon bar is missing as well, as online is only "the basics".
I'll link the two sheets, there is no confidential information so go ahead. I think the only way to fix it is with a script if some kind
https://www.dropbox.com/scl/fi/nlnqatmp7p2svx0re45u1/Rhodes-OLD.xlsx?rlkey=ggr1yvour9qf1nwxc347eycv4&dl=0
https://www.dropbox.com/scl/fi/l0zmhbv8ufiipoby97rnp/Rhodes-stuff.xlsx?rlkey=n13nftyq3ot8hcjgxix8ybgfw&dl=0
- JKPieterseOct 31, 2023Silver Contributor
Seabottom If you can somehow copy the Finances tab from the old to the new file, then this script will paste everything from the "old" Finances (2) tab to the new Finances tab:
function main(workbook: ExcelScript.Workbook) { // Your code here let srcRng = workbook.getWorksheet("Finances (2)").getRange("A1:I168"); let tgtRng = workbook.getWorksheet("Finances").getRange("A1:I168"); tgtRng.copyFrom(srcRng,ExcelScript.RangeCopyType.all) }
But the only way I was able to open the "Old" file was by using desktop Excel. Then it offered to do some repairs. After that I copied the sheet to the other file you attached an I copied the comments using the script above.
I can't check whether the comments are intact. See attached.
- SeabottomOct 31, 2023Copper Contributor
At first the code looked like any old ctrl+c/ctrl+v command, but I can confirm, that even when I open the newly created excel spreadsheet, all the comments are there. Which is strange, but I am super happy about that!
Why only a script would work, I don't know, but you have saved my weekend, as I was going to do it all back manually. Bless your heart!