Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Mon Feb 12, 2018 3:31 pm

Hello

I have found an issue with deleting rows where one of the cells is spanning multiple rows as a merged cell.

I am using spire 2.9

Image

trying to remove the bottom 2 rows on this will throw an exception.

table?.TableRows.RemoveAt(table.TableRows.Count-1, false);
table?.TableRows.RemoveAt(table.TableRows.Count - 1, false);

If i use "true" instead of false, it does not fail, but it will remove all 3 rows affected by the merged cell. This is not what i need.
In powerpoint it is possible to delete just a single row, even if one of the cells are part of a merged cell.

Does this feature exist in spire, and if so, how do it do it?

I have attached a project showcasing this issue.

Exception stacktrace:

Spire.Presentation.DocumentEditException was unhandled
HResult=-2146233088
Message=Outside row.
Source=Spire.Presentation
StackTrace:
ved Spire.Presentation.Collections.RowList.RemoveAt(Int32 firstRowIndex, Boolean withAttachedRows)
ved SpireTest.Program.Test() i C:\Projects\spiretest\SpireTest\Program.cs:linje 38
ved SpireTest.Program.Main() i C:\Projects\spiretest\SpireTest\Program.cs:linje 23
ved System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
ved System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
ved Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
ved System.Threading.ThreadHelper.ThreadStart_Context(Object state)
ved System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
ved System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
ved System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
ved System.Threading.ThreadHelper.ThreadStart()
InnerException:

Archigo
 
Posts: 21
Joined: Tue Apr 11, 2017 2:00 pm

Tue Feb 13, 2018 5:49 am

Dear Johan,

Thanks for your inquiry.
I have noticed the issue and posted it to our dev team for investigating and fixing, if there is any progress, we will let you know. Sorry for the inconvenience caused.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Tue Mar 06, 2018 5:27 am

Dear Johan,

Thanks for your waiting.
Glad to inform you the reported issue has been fixed in our latest hotfix Spire.Presentation Pack Hotfix Version:3.3.0. Now you could use below code to delete a single row which is included in merged rows.
Code: Select all
table.TableRows.RemoveAt(table.TableRows.Count - 1, false);


Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Fri Mar 09, 2018 8:41 am

Hi Johan,

Greetings from E-iceblue.
Has your issue been fixed with the hotfix?
Thanks in advance for your valuable feedback and time.

Sincerely,
Nina
E-iceblue support team
User avatar

Nina.Tang
 
Posts: 1182
Joined: Tue Sep 27, 2016 1:06 am

Return to Spire.Presentation