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

Free Support Forum - groupdocs.com

Excel inline tables not working

When I wanted a little table inline, it keeps complaining it can’t be used in Excel.

So I had to concat it into 1 cell, but thjis makes it very ugly, because now I have to add characters that sometimes not exists.

this is the solution for now
image.png (54.5 KB)

this is what comes out
image.png (36.6 KB)

but what i want to have is a small table with 3 columns…
with each combination in a new Row

Can this feature be added?

@TerraIndexService

Could you please share the template and data source files? Also share the sample code and the API version that you are evaluating.

We are working with version: 22.2

Attached the Excel and Json in the zip Template_Groupdocs.zip (226.0 KB)

try
{
var dataSourceInfos = new List();
if (partialTemplates.HasValue)
{
var dataSource = new DataSourceInfo(partialTemplates.Value.Value, partialTemplates.Value.Key);
dataSourceInfos.Add(dataSource);
}

            AddDataSources(dataSourceDefinitions, dataSourceStreams, dataSourceInfos);

            FileFormat groupDocsFileFormat = ConvertFileFormat(outputFileFormat);

            using (var templateStream = new MemoryStream(template))
            {
                using (var outputStream = new MemoryStream())
                {
                    var assembler = new DocumentAssembler
                    {
                        Options = DocumentAssemblyOptions.AllowMissingMembers | DocumentAssemblyOptions.InlineErrorMessages | DocumentAssemblyOptions.UpdateFieldsAndFormulas
                    };

                    // todo: load by convention
                    assembler.KnownTypes.Add(typeof(StringExtensions));

                    assembler.AssembleDocument(
                        templateStream,
                        outputStream,
                        new LoadSaveOptions(groupDocsFileFormat),
                        dataSourceInfos.ToArray());
                    
                    output.Report = outputStream.ToArray();
                    return output;
                }
            }
        }
        finally
        {
            DisposeAllDataSourceStreams(dataSourceStreams);
        }
1 Like

@TerraIndexService

Thanks for the details. We are investigating this scenario. Your investigation ticket ID is ASSEMBLYNET-223. We’ll notify you in case of any update.

@TerraIndexService

We need some more details. Could you please share an expected result document created manually in MS Excel as well?

See first tabs ‘‘pz 45’’
Burgeap_Excel(A12596_SS2) (37) - kopie.zip (1.3 MB)

@TerraIndexService

Thanks for the details. We’ll now further investigate this ticket.

@TerraIndexService

Thanks for the details. It seems, that your requirements can be met by changing the template. However, to ensure that, we need a code sample getting the template and JSON file provided and producing a result document. Unfortunately, the code your shared earlier does not compile as it has many missing dependencies. Could you please share a standalone console app without compilation errors that transforms the template and data into a result document?

Well, in the first post i have uploaded a zip file with the JSON and the template.
That’s all what’s needed and a default groupdocs call like the code we gave. There are no extension in this Template used.

Just take the same options, and insert the json with name: ‘TIProjectDetails’

If that doesn’t work, the concept idea we are trying to accomplish is clear right? Is it possible you create a small example that shows how it should be used inline, with cells on the side?

1 Like

@TerraIndexService

Let us investigate it. We’ll notify you in case of any update.

It helped to build a document from the template you shared. We are attaching a modified template producing a required result at the first sheet - Template_Groupdocs_Modified.zip (55.6 KB). Let us know if it works for you.

aaah, I see your trick!! Will try this, thank you!!

1 Like

@TerraIndexService

You’re welcome.