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

Free Support Forum - aspose.com

Information not shown in table

Good morning, I have a problem with a file generated by aspose word when it is opened in word 2013, some tables are not displaying the information entered.Screenshot_1_Word2013.png (6.3 KB)
Screenshot_2_Word360.png (9.4 KB)

code for insert information:

//tabela de registros
table = (Table) secaoOriginal.getChild(NodeType.TABLE, 9, true);
if(exibirMedicao && analise.registros != null && !analise.registros.isEmpty()){

				Boolean adicionaLinhaRegistro = false;

				for (RegistroMedicaoDTO registro : analise.registros) {
					if (adicionaLinhaRegistro) {
						//Adiciona a linha clona ao final da tabela.
						table.appendChild(ultimaLinha);
					}
					//Clona ultima linha para reutilizar nos próximos registros.						
					ultimaLinha = (Row)table.getLastRow().deepClone(true);

					row = table.getLastRow();
					row.getRange().replace("<riscoMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.risco), new FindReplaceOptions());
					row.getRange().replace("<dataMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.data), new FindReplaceOptions());
					row.getRange().replace("<amostraMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.amostra), new FindReplaceOptions());
					row.getRange().replace("<resultMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.resultado), new FindReplaceOptions());
					row.getRange().replace("<unidadeMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.unidade), new FindReplaceOptions());
					row.getRange().replace("<refMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.referencial), new FindReplaceOptions());
					row.getRange().replace("<tempoMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.tempo), new FindReplaceOptions());
					row.getRange().replace("<tipoMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.tipo), new FindReplaceOptions());
					row.getRange().replace("<doseMedL>", FuncoesTexto.tratarValorNullVazioHifen(registro.doseLegalFormatada), new FindReplaceOptions());
					row.getRange().replace("<classMedL>", FuncoesTexto.tratarValorNullVazioHifen(registro.classificacaoLegal), new FindReplaceOptions());
					row.getRange().replace("<validMed>", FuncoesTexto.tratarValorNullVazioHifen(registro.valida), new FindReplaceOptions());

					adicionaLinhaRegistro = true;
				}

				String flag = "";		
				int controleMesclagem = 0;
				for (Row linha : table) {

					String primeiraCelula = linha.getFirstCell().getText().trim();
					if(controleMesclagem > 3){
						if(!primeiraCelula.equals(flag)){

							linha.getFirstCell().getCellFormat().setVerticalMerge(CellMerge.FIRST);				
						} else {
							linha.getFirstCell().getCellFormat().setVerticalMerge(CellMerge.PREVIOUS);
						}
						flag = primeiraCelula;						
					}
					controleMesclagem++;
				}
			}

@andersonxf,

Please make sure that “Show/Hide paragraph marks and other hidden formatting symbols” option is turned on in Microsoft Word. Also, to turn on the display of hidden text in Microsoft Word, please follow these steps:

  1. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 and Word 2013 display the File tab of the ribbon and then click Options.)
  2. Click Display at the left side of the dialog box.
  3. Click the Hidden Text check box. Make sure it is checked.
  4. Click on OK.

Hope, this helps.

Good morning I already configured it as you requested, but it still did not work, in Word 2013 it still does not display the information in some cells

@andersonxf,

Please ZIP and upload your sample Word document (you are getting this problem with) here for testing. We will then investigate the issue on our end and provide you more information.