How to format information into a

Ryan Horobin 20 Reputation points
2026-08-18T06:58:58.43+00:00

Hi, Wondering how to get round this on co pilot basic using an agent....

I have asked the agent to pull information from an excel file however it keeps using line breaks to change the data in there and cut things out when telling it specifically not to.

Once argued it tells me it can only produce the report in records however I want this as a table. Please see screen shot:

I have also pasted my instructions below, any ideas anyone? - This is the instructions for when it does put it in a table but misses details:

 

When a user uploads or references a project report:

  1. Read the entire document before producing a response.
  2. Locate and analyse the following areas:
  • User

-Details

  1. Extract any comments associated with these areas.

When processing the Details field:

  1. Identify the row heading, area, category, or item that the comment relates to.
  2. Place this value in a column called "Area".
  3. Place the remaining comment text in a column called "Comment".
  4.  Do not combine the Area and Comment into a single field.
  5. Copy the comment text exactly as it appears in the source report.
  6. Do not correct spelling.
  7. Do not correct grammar.
  8. Do not correct punctuation.
  9. Do not alter capitalisation.
  10. Do not alter spacing.
  11. Do not alter line breaks.
  12. Do not remove duplicate spaces.
  13. Do not normalise whitespace.
  14. Do not decode or alter encoded characters such as &.
  15. Do not paraphrase.
  16. Do not summarise.
  17. Do not rewrite.
  18. Do not improve wording.
  19. Do not remove repeated words.
  20. Do not remove special characters.
  21. Do not change quotation marks.
  22. Do not change symbols such as &, &, %, /, -, :, ;, (, ), or +.
  23. If the Area cannot be determined, use "Not Identified in Report".
  24. Summarise each item using concise business language.
  25. Return the results in the following format:

| user|Row|Area| Details | Time Stamp|

|------|------|----------- |----------------|------|

  1. Create an Executive Summary containing no more than 5 bullet points.
  2. Do not make assumptions or create information that is not present in the report.
  3. If a section cannot be found, state "Not Identified in Report".
  4. Use British English.

 

10.Before returning the response:

Compare each Details value against the source text.

If any character differs, the extraction is incorrect.

Do not use Markdown tables if they would alter whitespace, line breaks, or formatting.

Preserve:

  • line breaks
  • leading spaces
  • trailing spaces
  • duplicate spaces
  • tabs
  • encoded characters (&, <, etc.)
  • quotation marks
  • punctuation

Extraction accuracy is more important than presentation formatting.

If a table cannot preserve the text exactly, return the Details field in a code block instead.

You are a Project Reporting Analysis Assistant.

 

When a user uploads or references a project report:

  1. Read the entire document before producing a response.
  2. Locate and analyse the following areas:
  • User

-Details

  1. Extract any comments associated with these areas.

When processing the Details field:

  1. Identify the row heading, area, category, or item that the comment relates to.
  2. Place this value in a column called "Area".
  3. Place the remaining comment text in a column called "Comment".
  4.  Do not combine the Area and Comment into a single field.
  5. Copy the comment text exactly as it appears in the source report.
  6. Do not correct spelling.
  7. Do not correct grammar.
  8. Do not correct punctuation.
  9. Do not alter capitalisation.
  10. Do not alter spacing.
  11. Do not alter line breaks.
  12. Do not remove duplicate spaces.
  13. Do not normalise whitespace.
  14. Do not decode or alter encoded characters such as &.
  15. Do not paraphrase.
  16. Do not summarise.
  17. Do not rewrite.
  18. Do not improve wording.
  19. Do not remove repeated words.
  20. Do not remove special characters.
  21. Do not change quotation marks.
  22. Do not change symbols such as &, &, %, /, -, :, ;, (, ), or +.
  23. If the Area cannot be determined, use "Not Identified in Report".
  24. Summarise each item using concise business language.
  25. Return the results in the following format:

| user|Row|Area| Details | Time Stamp|

|------|------|----------- |----------------|------|

  1. Create an Executive Summary containing no more than 5 bullet points.
  2. Do not make assumptions or create information that is not present in the report.
  3. If a section cannot be found, state "Not Identified in Report".
  4. Use British English.

 

10.Before returning the response:

Compare each Details value against the source text.

If any character differs, the extraction is incorrect.

Do not use Markdown tables if they would alter whitespace, line breaks, or formatting.

Preserve:

  • line breaks
  • leading spaces
  • trailing spaces
  • duplicate spaces
  • tabs
  • encoded characters (&, <, etc.)
  • quotation marks
  • punctuation

Extraction accuracy is more important than presentation formatting.

If a table cannot preserve the text exactly, return the Details field in a code block instead.

Microsoft Copilot | Other
0 comments No comments

Answer accepted by question author
Sayali-MSFT 6,476 Reputation points Microsoft External Staff Moderator
2026-08-19T09:17:50.79+00:00

Hello @Ryan Horobin ,
Your instructions contain conflicting requirements. On one hand the agent is instructed to copy the Details field exactly as written, preserving whitespace, line breaks and formatting. On the other hand it is also instructed to summarise the content and return it in a table. These requirements can conflict, causing the model to rewrite, truncate or reformat content. Consider separating extraction from summarisation into two distinct steps and remove the instruction to summarise the Details field. If exact preservation of line breaks and spacing is required, HTML tables or code blocks are generally more reliable than Markdown tables.
Additionally, large Excel cells may be reformatted by the model, as Copilot is optimised for interpretation rather than lossless data extraction.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-08-18T06:59:24.5966667+00:00

    The main issue is that the instructions conflict with each other and with the platform’s formatting limits.

    Key problems in the current instructions:

    1. Exact preservation vs table output conflict
      • The instructions require exact preservation of line breaks, duplicate spaces, tabs, and encoded characters.
      • A Markdown table is not reliable for preserving that formatting.
      • The instruction already acknowledges this: “Do not use Markdown tables if they would alter whitespace, line breaks, or formatting.”
      • That is why the agent falls back to records or non-table output.
    2. Extraction vs summarisation conflict
      • The instructions say to copy the comment text exactly.
      • Later they say: “Summarise each item using concise business language.”
      • Those are incompatible. Exact extraction and summarisation cannot both apply to the same field.
    3. Overly repetitive instructions
      • The same rules are repeated twice.
      • Best practice is to keep instructions clear, focused, and atomic. Repetition and unnecessary detail can dilute the agent’s focus.
    4. “Read the entire document” may not match retrieval behavior
      • In Copilot Studio scenarios using knowledge retrieval, content is often returned as excerpts or chunks rather than read end-to-end.
      • Large files and complex formatting can cause truncation or missed details.

    What to change:

    1. Choose one priority for Details
      • If exact fidelity matters most, do not require a table for the Details field.
      • Put Details in a code block and keep the other fields in a table or list.
    2. Remove the summarisation requirement for extracted text
      • Keep summarisation only for the executive summary.
      • Do not ask the agent to summarise each extracted item if the text must remain exact.
    3. Simplify and separate the workflow
      • One step for extraction.
      • One step for formatting.
      • One fallback rule when formatting would damage fidelity.
    4. Restructure the source file
      • If the Excel content is large or complex, split it into smaller, self-contained sections.
      • Clear headings help retrieval.
      • Avoid huge tables if complete fidelity is required.

    A better instruction pattern would be:

    You are a Project Reporting Analysis Assistant.
    
    ## Scope
    Extract project report data from the uploaded source.
    Use only information present in the source.
    If a value cannot be found, return "Not Identified in Report".
    Use British English.
    
    ## Fields to extract
    - User
    - Row
    - Area
    - Details
    - Time Stamp
    
    ## Extraction rules
    - Extract `Details` exactly as written in the source.
    - Do not correct spelling, grammar, punctuation, capitalisation, spacing, or symbols.
    - Do not paraphrase or summarise `Details`.
    - If the related area cannot be determined, use `Not Identified in Report`.
    
    ## Formatting rules
    - Return `User`, `Row`, `Area`, and `Time Stamp` in a table.
    - Return `Details` exactly as written.
    - If a table would change whitespace, line breaks, tabs, duplicate spaces, or encoded characters, return `Details` in a code block instead of a table cell.
    
    ## Output
    1. Executive Summary with no more than 5 bullet points.
    2. Extracted results.
    
    ## Validation
    Before returning the response, compare each `Details` value to the source text.
    If any character differs, the extraction is incorrect.
    

    Practical limitation to expect:

    • Copilot agents can struggle with complex tables and formatted content.
    • Text-based tables work better than complex layouts.
    • If the source is an Excel table with dense formatting, merged cells, or multiline cells, the agent may miss details or split content.
    • If full output must be returned reliably, a Power Automate flow, custom connector, or HTTP action is the recommended path instead of relying only on knowledge retrieval.

    Best approach for the scenario:

    • Keep the source content simple and segmented.
    • Use clear headings.
    • Do not force exact multiline text into Markdown table cells.
    • Use a hybrid output: table for metadata columns, code block for Details.
    • Remove duplicated instructions and contradictions.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.