Ambisonics is an established framework to capture, process, and reproduce spatial sound fields based on its spherical harmonics representation. We propose a generalization of conventional spherical ambisonics to the spheroidal coordinate system and spheroidal microphone arrays, which represent sound fields by means of spheroidal wave functions. This framework is referred to as spheroidal ambisonics and a formulation for the case of prolate spheroidal coordinates is presented. Spheroidal ambisonics allows analytical encoding of sound fields using spheroidal microphone arrays. In addition, an analytical conversion formula from spheroidal ambisonics to spherical ambisonics is derived in order to ensure compatibility with the existing ecosystem of spherical ambisonics. Numerical experiments are performed to verify spheroidal ambisonic encoding and transcoding when used for spatial sound field recording. It is found that the sound field reconstructed from the transcoded coefficients has a zone of accurate reconstruction which is prolonged towards the long axis of a prolate spheroidal microphone array.