We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Joining two shapes with line and creating something like organigram

Is it possible to joint two shapes with a line in Aspose.Cells? But join in the way, that when I move one shape, this line goes with the shape.

Hi,


Thanks for providing us screenshot with details.

Do you mean SmartArt Organization chart in MS Excel as if you move the rectangle, the attached connector is flexible enough and is moved/extended accordingly? Well, currently, Aspose.Cells does not support to create organization charts or diagrams. By the way, you may try to programmatically create shapes (lines, rectangles, etc.) and group these shapes accordingly using Aspose.Cells API to try to make your diagram if possible.

Thank you.

Thanks for response.


It’s unfortunate, that there is no such functionality.

But if I use grouped shapes and lines as you suggested, so when I will open excel file, I will be able to move the whole group? I won’t be able to use flexible connector?

One more question, I have excel file with two shape, connected together with connector. But when I open file programmatically with Aspose.Cells and then save it back immediately, the line which was connecting those shapes, now it’s not being connected to the shapes. Is that expected behavior?
Hi,

mantas:
One more question, I have excel file with two shape, connected together with connector. But when I open file programmatically with Aspose.Cells and then save it back immediately, the line which was connecting those shapes, now it's not being connected to the shapes. Is that expected behavior?

Could you provide your template Excel file and output Excel file (by Aspose.Cells APIs) and paste your sample code here, we will check it soon.

Thank you.

It doesn’t work when I save like this - workBook.Save(stream, SaveFormat.Excel97To2003);


But saving to a newer format works just fine - workBook.Save(stream, SaveFormat.Xlsx);

Coming back to previous post, if I use grouped shapes and lines as you suggested, so when I will open excel file, I will be able to move the whole group? I won’t be able to use flexible connector?
Hi,

mantas:
It doesn't work when I save like this - workBook.Save(stream, SaveFormat.Excel97To2003);

Could you provide us the template Excel file, we will check it soon.

mantas:
Coming back to previous post, if I use grouped shapes and lines as you suggested, so when I will open excel file, I will be able to move the whole group? I won't be able to use flexible connector?

Yes, your understanding is correct as if you make something like the organization chart via using rectangles and lines, you will group them and save the file. When you open the output file into MS Excel and try to move any shape, the whole group would be moved.

Moreover, I am afraid, currently, we do not support calculating the position of connect points of shapes. We can support settings connectors between the Rectangles in the next month or so.

Thank you.

Thanks for your time.


Code for downloading excel file, when connector being deattached
	var path = @“D:\Workspaces\WO2\WellOffice.Next.Applications\ActivityPlanner\Ap.Web\App_Data\form.xlsx”;
var workBook = new Workbook(path);
Stream stream = new MemoryStream();
workBook.Save(stream, SaveFormat.Excel97To2003);
stream.Position = 0;
    <span style="color:blue;">return</span> stream;</pre></div>

Hi,


Thanks for the template files.

After an initial test, I observed the issue as you mentioned by using the following sample code with your template XLSX file. I found that shapes (rectangles, lines, etc.) are not bonded anymore when re-saving from XLSX to XLS, I can separate each shape easily in MS Excel via mouse. The shapes are not truly connected anymore as per the original XLSX file.
e.g
Sample code:

var path = “e:\test2\form_original.xlsx”;
var workBook = new Workbook(path);
MemoryStream stream = new MemoryStream();
workBook.Save(stream, SaveFormat.Excel97To2003);
string filename = “e:\test2\out1.xls”;

FileStream fstream = new System.IO.FileStream(filename, FileMode.OpenOrCreate);
stream.Position = 0;
byte[] data = stream.ToArray();
fstream.Write(data, 0, data.Length);

I have logged a ticket with an id “CELLSNET-45303” for your issue. We will look into it soon.

Once we have an update on it, we will let you know here.

Thank you.

Hi,


This is to inform you that we have fixed your issue (logged earlier as “CELLSNET-45303”) now. We will soon provide you the fix after performing QA and incorporating other enhancements or fixes.

Thank you.
Hi,

Thanks for using Aspose.Cells.

Please download and try the following latest fix

Aspose.Cells for .NET v17.4.1 (.NET 2.0) compiled in .NET Framework 2.0.
Aspose.Cells for .NET v17.4.1 (.NET 4.0) compiled in .NET Framework 4.0.

and let us know your feedback.

The issues you have found earlier (filed as CELLSNET-45303) have been fixed in Aspose.Cells for .NET 17.5.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.