ldf or dbc convert to excel

are there some m script, that can convert ldf to excel, or dbc to excel?
as currently i learn and know about lin or can bus.

6 commentaires

Deep
Deep le 25 Fév 2026 à 9:31
Convert DBC File to Excel
Description
Convert a CAN database (.dbc) file to an Excel spreadsheet using the Vehicle Network Toolbox.
Requirements
Vehicle Network Toolbox must be installed. Verify with ver.
Syntax
db = canDatabase(filename)
writetable(table(db.MessageInfo), outputfile)
Example
% Load DBC file
db = canDatabase('C:\path\to\filename.dbc');
% Write message info to Excel
writetable(table(db.MessageInfo), 'output.xlsx');
Common Errors
Unable to find DBC-file
Cause: File not found in current working directory.
Resolution: Verify the file path using pwd and provide the full path to the file.
pwd % check current directory
db = canDatabase('C:\full\path\to\filename.dbc');
Limitations
LDF files have limited native support. See MATLAB File Exchange for community scripts.
Relevent Topics
博
le 25 Fév 2026 à 9:51
thanks your very much, that means i can only use dbc convert to excel, can not convert ldf to excel.,
博
le 26 Fév 2026 à 1:06
i follow your instruction to open dbc and convert it to excel, but open excel file, only one cell value 'var1', the massage info should including 7 cells value.
Walter Roberson
Walter Roberson le 26 Fév 2026 à 7:15
instead of
writetable(table(db.MessageInfo), 'output.xlsx');
You would need
writetable(struct2table(db.MessageInfo), 'output.xlsx')
博
le 26 Fév 2026 à 7:45
it display error, and can not generate excel file, are there some rules for dbc file?
Walter Roberson
Walter Roberson le 26 Fév 2026 à 18:46
Please show the first few lines of output of
struct2table(db.MessageInfo)

Connectez-vous pour commenter.

Réponses (1)

Walter Roberson
Walter Roberson le 25 Fév 2026 à 5:07

0 votes

It looks like it is possible to convert ldf to excel.
If you follow the steps described at https://www.mathworks.com/help/vnt/ug/decode-lin-data-from-blf-files.html you end up with an object that includes three tables. You would then have to convert the individual tables internal structure into something that is able to be saved in excel, and then you would do the saving in excel. It would probably be easier to write the three different tables to different files, or else to write the three different tables to different sheets inside one file; if you try to combine them all to one sheet, you end up with something that is difficult to work with automatically.

3 commentaires

博
le 25 Fév 2026 à 6:33
this function 'linDatabase' is used version 2025b, my matlab was very early, are there some other method to do this?
Walter Roberson
Walter Roberson le 25 Fév 2026 à 8:13
Which MATLAB release are you using? And do you have the Vehicle Network Toolbox?
博
le 25 Fév 2026 à 8:18
Modifié(e) : le 25 Fév 2026 à 8:19
version is R2024a,i have this toolbox, when i input 'ver' in the command window,
it display:
Vehicle Network Toolbox Version 24.1 (R2024a)
but when i input lindatabase,it display:
>> linDatabase
Unrecognized function or variable 'linDatabase'.
>>

Connectez-vous pour commenter.

Catégories

Question posée :

博
le 25 Fév 2026 à 2:44

Commenté :

le 26 Fév 2026 à 18:46

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by