Process Xlsx files using Ingest Attachment Processor Plugin


(Guruprasad Prabhu) #1

I am new to ES and have just started exploring .I have a requirement to read MS office documents like excel, doc ,msg etc. I tried processing excel document using below code

$params = [
'index' => 'index',
'type' => 'type',
'id' => 'document_id',
'pipeline' => 'attachment',
'body' => [
'content' => base64_encode(file_get_contents('a.xlsx'))
]
];
$response1= $client->index($params);

It is getting success but all the excel content is stored in one field.

Is it possible to split the data column wise key pair values (column name as key and column value as value) using this plug in?

Thanks in advance

-Guru


(David Pilato) #2

No it's not.
You should export your doc as CSV instead.


(Guruprasad Prabhu) #3

Do you suggest to use logastash for importing CSVs?


(David Pilato) #4

Yes. Or some grok processor with ingest but will be less efficient.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.