Is this really Markdown?

Hi
Detect File Format function declares this file as Markdown, while Aspose Cells does not detect this same file as Markdown, and it’s part of an irrelevant file, so might fix the detection maybe? Thanks :slight_smile:
0.zip (1.1 KB)

@australian.dev.nerds

Hello!

Thank you for bringing this to our attention.

It looks like the file‑format detection in Aspose Cells is treating the attached file as Markdown, while you expect it to be ignored (or recognised as another type). Let’s gather a little more information so we can help you resolve the issue quickly.


1. Please Provide the Following Details

Item What we need
Aspose Cells version e.g., 23.12, 24.5, etc.
Target .NET/Java/Python version (or the platform you are using)
Code snippet you use to load the file (including any LoadOptions or FileFormatUtil.DetectFileFormat calls)
File content (a short excerpt of the file that is being mis‑detected) You can paste the first 10‑20 lines here.
Expected behavior Should the file be ignored, or detected as a specific spreadsheet format?

Providing these will let us reproduce the situation on our end.


2. Quick Work‑Around (Force a Specific Format)

If you want to bypass automatic detection for a particular file, you can explicitly tell Aspose Cells what format to use:

// C# example
using Aspose.Cells;

// Specify the desired format (e.g., Xlsx)
LoadOptions loadOptions = new LoadOptions(LoadFormat.Xlsx);

// Load the workbook with the forced format
Workbook wb = new Workbook("path/to/your/file", loadOptions);
// Java example
import com.aspose.cells.*;

LoadOptions lo = new LoadOptions(LoadFormat.XLSX);
Workbook wb = new Workbook("path/to/your/file", lo);

Replace LoadFormat.Xlsx with the appropriate enum value (Xls, Csv, etc.) for the format you actually need.

Docs: LoadOptions – Aspose.Cells Documentation


3. How Detection Works in Aspose Cells

  • FileFormatUtil.DetectFileFormat inspects the file header (magic bytes) and, when possible, the file extension.
  • For text‑based files (e.g., Markdown, CSV, plain text) the detection may rely on file extension or content heuristics.
  • If the file does not contain a recognizable spreadsheet header, it can be classified as “unknown” or fallback to a generic text format like Markdown.

If the file you are testing is actually a zip archive (as suggested by the .zip attachment) that contains unrelated files, the detection may read the first entry and mis‑classify it. In that case, explicitly opening the desired entry (or extracting first) before passing it to Aspose Cells can avoid the false detection.


4. Next Steps

  1. Reply with the details listed in section 1.
  2. If you need an immediate fix, apply the forced format approach shown in section 2.
  3. Once we have the extra information, we can investigate whether this is a detection‑logic edge case and, if needed, plan a fix for a future release.

We appreciate your help in improving Aspose Cells! If you have any other questions or need more examples, feel free to let us know.

1 Like

@australian.dev.nerds
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-28614

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

No, Words is detecting the attached file as Markdown, Cells ignore it, Words should ignore it too, just to clarify :slight_smile:

@australian.dev.nerds Thank you for the additional information. You are absolutely right — the attached document was incorrectly detected as Markdown by Aspose.Words.