Problem when copying TypeError: Converting circular structure to JSON #108
Replies: 1 comment
-
Hello. It's not a correct way to save ApiRange in GlobalVariable. You can save in it any object that can be saved as JSON. There is the correct way how it can be done:
|
Beta Was this translation helpful? Give feedback.
-
`builder.OpenFile("${files[0]}");
var oWorksheet = Api.GetSheet("Лист1");
var Rng = oWorksheet.GetUsedRange()
GlobalVariable["CR"] = Rng
builder.CloseFile();
builder.OpenFile("${files[1]}");
var oWorksheet = Api.GetSheet("Лист1");
var Rng = GlobalVariable["CR"];
Rng.Insert("down")
builder.SaveFile("xlsx", "${files[1]}");
builder.CloseFile();
`
TypeError: Converting circular structure to JSON --> starting at object with constructor 'Object' --- property 'documentElement' closes the circle at JSON.stringify (<anonymous>) at <anonymous>:1:6 TypeError: Cannot read property 'Insert' of undefined at <anonymous>:3:5
This code doesn't work but docbuilder version is 7.4. for windows. What am I doing wrong? Is there already a solution to this problem? Please help it is very necessary.
Beta Was this translation helpful? Give feedback.
All reactions